Add bookmark admin
This commit is contained in:
17
slices/admin/actions/bookmarks/delete.rb
Normal file
17
slices/admin/actions/bookmarks/delete.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
module Admin
|
||||
module Actions
|
||||
module Bookmarks
|
||||
class Delete < Action
|
||||
|
||||
include Deps["repos.bookmark_repo", "repos.post_tag_repo"]
|
||||
|
||||
def handle(req, res)
|
||||
bookmark_id = req.params[:id]
|
||||
|
||||
post_tag_repo.delete_by_post_id(post_id: bookmark_id)
|
||||
bookmark_repo.delete(id: bookmark_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user