Log show and create

This commit is contained in:
2023-01-31 19:12:04 +11:00
parent 24b4ba6854
commit 24deb6923d
2 changed files with 5 additions and 2 deletions

View File

@@ -2,10 +2,11 @@ module Adamantium
module Actions
module Media
class Create < Action
include Deps["commands.media.upload"]
include Deps["commands.media.upload", "logger"]
before :authenticate!
def handle(req, res)
logger.info("I am CREATE")
data = req.params[:file]
halt 401 unless verify_scope(req: req, scope: :media)

View File

@@ -2,9 +2,11 @@ module Adamantium
module Actions
module Media
class Show < Action
include Deps["settings"]
include Deps["settings", "logger"]
def handle(req, res)
logger.info("I am SHOW")
res.body = if req.params[:q] == "source"
{
items: media_url(req.params[:file])