Fix media endpoints
This commit is contained in:
@@ -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]
|
||||||
|
@@ -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"
|
||||||
|
Reference in New Issue
Block a user