Initial commit
This commit is contained in:
14
app/commands/posts/delete.rb
Normal file
14
app/commands/posts/delete.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Adamantium
|
||||
module Commands
|
||||
module Posts
|
||||
class Delete < Command
|
||||
include Deps["repos.post_repo"]
|
||||
def call(params:)
|
||||
slug = URI(params[:url]).path.split("/").last
|
||||
|
||||
post_repo.delete!(slug)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user