Ability to remove posts from trips
This commit is contained in:
16
slices/admin/commands/trips/remove_post.rb
Normal file
16
slices/admin/commands/trips/remove_post.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
module Admin
|
||||
module Commands
|
||||
module Trips
|
||||
class RemovePost
|
||||
include Dry::Monads[:result]
|
||||
include Deps["repos.post_trip_repo"]
|
||||
|
||||
def call(trip_id:, post_id:)
|
||||
post_trip_repo.remove(trip_id: trip_id, post_id: post_id)
|
||||
|
||||
Success()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user