Fix media endpoints

This commit is contained in:
2023-01-31 19:02:00 +11:00
parent f8945c5b9c
commit f7f6bf0979
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ module Adamantium
module Media module Media
class Create < Action class Create < Action
include Deps["commands.media.upload"] include Deps["commands.media.upload"]
before :authorize! before :authenticate!
def handle(req, res) def handle(req, res)
data = req.params[:file] data = req.params[:file]

View File

@@ -7,7 +7,7 @@ module Adamantium
def handle(req, res) def handle(req, res)
res.body = if req.params[:q] == "source" res.body = if req.params[:q] == "source"
{ {
items: media_url(params[:file]) items: media_url(req.params[:file])
}.to_json }.to_json
else else
"Micropub media endpoint" "Micropub media endpoint"