From a150edff5634e5df2e07b936e9e67007db9f8606 Mon Sep 17 00:00:00 2001 From: inhji Date: Mon, 24 Jul 2023 12:10:23 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Elib/chiya=5Fweb/indie/micropub=5Fhandl?= =?UTF-8?q?er.ex=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/chiya_web/indie/micropub_handler.ex | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/chiya_web/indie/micropub_handler.ex b/lib/chiya_web/indie/micropub_handler.ex index 1739831..477f402 100644 --- a/lib/chiya_web/indie/micropub_handler.ex +++ b/lib/chiya_web/indie/micropub_handler.ex @@ -17,6 +17,17 @@ defmodule ChiyaWeb.Indie.MicropubHandler do "tags" ] + @post_types [ + %{ + "type" => "note", + "name" => "Note" + }, + %{ + "type" => "bookmark", + "name" => "Bookmark" + } + ] + @impl true def handle_create(type, properties, access_token) do Logger.info("Handle create") @@ -86,12 +97,7 @@ defmodule ChiyaWeb.Indie.MicropubHandler do config = %{ "media-endpoint" => url(~p"/indie/micropub/media"), "destination" => [], - "post-types" => [ - %{ - "type" => "note", - "name" => "Note" - } - ], + "post-types" => @post_types, "channels" => Enum.map(channels, fn c -> %{