add media-endpoint to config query
This commit is contained in:
parent
d9fd1bb08d
commit
a16f93d4c3
1 changed files with 23 additions and 17 deletions
|
@ -2,6 +2,10 @@ defmodule ChiyaWeb.Indie.MicropubHandler do
|
|||
@behaviour PlugMicropub.HandlerBehaviour
|
||||
require Logger
|
||||
|
||||
use Phoenix.VerifiedRoutes,
|
||||
endpoint: ChiyaWeb.Endpoint,
|
||||
router: ChiyaWeb.Router
|
||||
|
||||
alias ChiyaWeb.Indie.Properties, as: Props
|
||||
alias ChiyaWeb.Indie.Token
|
||||
|
||||
|
@ -104,8 +108,8 @@ defmodule ChiyaWeb.Indie.MicropubHandler do
|
|||
:ok ->
|
||||
channels = Chiya.Channels.list_channels()
|
||||
|
||||
{:ok,
|
||||
%{
|
||||
config = %{
|
||||
"media-endpoint" => url(~p"/indie/micropub/media"),
|
||||
"destination" => [],
|
||||
"post-types" => [
|
||||
%{
|
||||
|
@ -120,7 +124,9 @@ defmodule ChiyaWeb.Indie.MicropubHandler do
|
|||
"name" => c.name
|
||||
}
|
||||
end)
|
||||
}}
|
||||
}
|
||||
|
||||
{:ok, config}
|
||||
|
||||
_ ->
|
||||
{:error, :insufficient_scope}
|
||||
|
|
Loading…
Reference in a new issue