Add highlights
This commit is contained in:
16
slices/admin/commands/highlight/create.rb
Normal file
16
slices/admin/commands/highlight/create.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
module Admin
|
||||
module Commands
|
||||
module Highlight
|
||||
class Create
|
||||
include Dry::Monads[:result]
|
||||
include Deps["repos.highlight_repo"]
|
||||
|
||||
def call(post_id:, text:)
|
||||
highlight_repo.create(post_id:, text:)
|
||||
|
||||
Success()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user