MastoAPI: Add unimplemented status card endpoint.
authoreal <eal@waifu.club>
Fri, 9 Mar 2018 18:56:21 +0000 (20:56 +0200)
committereal <eal@waifu.club>
Fri, 9 Mar 2018 18:58:00 +0000 (20:58 +0200)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
lib/pleroma/web/router.ex

index 0d84308e74f7a229605fbc3bce49056f94bd9d08..c039412547610962114eb7e94357b7d45236fa8e 100644 (file)
@@ -624,6 +624,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController 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)
index 520ac4a8ceb1819159af4d7a573b89e88a0340c9..3e9a8ba7b020e52454e0d45778d6b7d682b5003b 100644 (file)
@@ -132,6 +132,7 @@ defmodule Pleroma.Web.Router 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