„lib/chiya_web/indie/micropub_handler.ex“ ändern
This commit is contained in:
parent
66e56fd6fc
commit
a150edff56
1 changed files with 12 additions and 6 deletions
|
@ -17,6 +17,17 @@ defmodule ChiyaWeb.Indie.MicropubHandler do
|
||||||
"tags"
|
"tags"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@post_types [
|
||||||
|
%{
|
||||||
|
"type" => "note",
|
||||||
|
"name" => "Note"
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
"type" => "bookmark",
|
||||||
|
"name" => "Bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_create(type, properties, access_token) do
|
def handle_create(type, properties, access_token) do
|
||||||
Logger.info("Handle create")
|
Logger.info("Handle create")
|
||||||
|
@ -86,12 +97,7 @@ defmodule ChiyaWeb.Indie.MicropubHandler do
|
||||||
config = %{
|
config = %{
|
||||||
"media-endpoint" => url(~p"/indie/micropub/media"),
|
"media-endpoint" => url(~p"/indie/micropub/media"),
|
||||||
"destination" => [],
|
"destination" => [],
|
||||||
"post-types" => [
|
"post-types" => @post_types,
|
||||||
%{
|
|
||||||
"type" => "note",
|
|
||||||
"name" => "Note"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"channels" =>
|
"channels" =>
|
||||||
Enum.map(channels, fn c ->
|
Enum.map(channels, fn c ->
|
||||||
%{
|
%{
|
||||||
|
|
Loading…
Reference in a new issue