Allow media deletion
This commit is contained in:
15
slices/admin/commands/media/delete.rb
Normal file
15
slices/admin/commands/media/delete.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Admin
|
||||
module Commands
|
||||
module Media
|
||||
class Delete
|
||||
include Dry::Monads[:result]
|
||||
|
||||
def call(path:)
|
||||
File.delete(path)
|
||||
|
||||
Success()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user