Initial commit

This commit is contained in:
2023-01-27 22:55:09 +11:00
commit 833f3ea8b2
130 changed files with 5637 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
module Adamantium
module Actions
module Media
class Create < Action
before :authenticate
include Deps["commands.media.upload"]
def handle(req, res)
data = req.params[:file]
halt 401 if verify_scope(req: req, scope: :media)
upload(file: data) do |m|
m.failure do |v|
res.status = 422
end
m.success do |v|
res.status = 201
res.body = v
end
end
end
end
end
end
end