aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2018-03-09 18:58:55 +0000
committereal <eal@waifu.club>2018-03-09 18:58:55 +0000
commit62037690e8f7b8b0715038cdaef4f03af9d362dc (patch)
treeee001372cab34b3279ba96b246ba4cc04c9c4463 /lib
parentc661cf504b9108b5d66f7a653e8a27f71ef9f07a (diff)
parent18e1202a3bc9b405b2c35fcde7a6fa69fd47a888 (diff)
downloadpleroma-62037690e8f7b8b0715038cdaef4f03af9d362dc.tar.gz
Merge branch 'fix/mastoapi-card' into 'develop'
MastoAPI: Add unimplemented status card endpoint. See merge request pleroma/pleroma!71
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex5
-rw-r--r--lib/pleroma/web/router.ex1
2 files changed, 6 insertions, 0 deletions
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 @@ 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)
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 @@ 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