Skip to content
Snippets Groups Projects
Commit a764e6fd authored by lain's avatar lain
Browse files

Merge branch 'mastodon-api-relationships-without-id-param' into 'develop'

Mastodon API: relationships without id param

See merge request pleroma/pleroma!432
parents e1c40b8c e42f2efa
Branches
No related tags found
No related merge requests found
......@@ -443,6 +443,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
render(conn, AccountView, "relationships.json", %{user: user, targets: targets})
end
# Instead of returning a 400 when no "id" params is present, Mastodon returns an empty array.
def relationships(%{assigns: %{user: user}} = conn, _) do
conn
|> json([])
end
def update_media(%{assigns: %{user: _}} = conn, data) do
with %Object{} = object <- Repo.get(Object, data["id"]),
true <- is_binary(data["description"]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment