[#2456] Added support for embed_relationships param, nailed down endpoints which should support it. Fixed :source_mutes relationships subset fetching.
This commit is contained in:
parent
b960a9430d
commit
63a1a82f38
7 changed files with 99 additions and 13 deletions
|
|
@ -103,4 +103,9 @@ defmodule Pleroma.Web.ControllerHelper do
|
|||
def put_if_exist(map, _key, nil), do: map
|
||||
|
||||
def put_if_exist(map, key, value), do: Map.put(map, key, value)
|
||||
|
||||
def embed_relationships?(params) do
|
||||
# To do: change to `truthy_param?(params["embed_relationships"])` once PleromaFE supports it
|
||||
not explicitly_falsy_param?(params["embed_relationships"])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue