From 18e1202a3bc9b405b2c35fcde7a6fa69fd47a888 Mon Sep 17 00:00:00 2001 From: eal Date: Fri, 9 Mar 2018 20:56:21 +0200 Subject: [PATCH] MastoAPI: Add unimplemented status card endpoint. --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 5 +++++ lib/pleroma/web/router.ex | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 0d84308e7..c03941254 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -624,6 +624,11 @@ def empty_array(conn, _) do json(conn, []) end + def empty_object(conn, _) do + Logger.debug("Unimplemented, returning an empty object") + json(conn, %{}) + end + def render_notification(user, %{id: id, activity: activity, inserted_at: created_at} = _params) do actor = User.get_cached_by_ap_id(activity.data["actor"]) created_at = NaiveDateTime.to_iso8601(created_at) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 520ac4a8c..3e9a8ba7b 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -132,6 +132,7 @@ def user_fetcher(username) do get "/statuses/:id", MastodonAPIController, :get_status get "/statuses/:id/context", MastodonAPIController, :get_context + get "/statuses/:id/card", MastodonAPIController, :empty_object get "/statuses/:id/favourited_by", MastodonAPIController, :favourited_by get "/statuses/:id/reblogged_by", MastodonAPIController, :reblogged_by