Allow media deletion
This commit is contained in:
13
slices/admin/actions/photos/delete.rb
Normal file
13
slices/admin/actions/photos/delete.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Admin
|
||||
module Actions
|
||||
module Photos
|
||||
class Delete < Admin::Action
|
||||
include Deps["commands.media.delete"]
|
||||
|
||||
def handle(req, res)
|
||||
delete.call(path: File.join(Hanami.app.root, "public", "media",req.params[:year], req.params[:path]))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user