Web.MastodonAPI.MastodonAPIController: Use variable+pipe rather than nesting function calls
This commit is contained in:
parent
bfd10516c9
commit
ddd57c8a0f
|
@ -482,9 +482,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
end
|
||||
|
||||
def notifications(%{assigns: %{user: user}} = conn, params) do
|
||||
exclude_types =
|
||||
params["exclude_types"]
|
||||
|> Notification.masto_to_ap()
|
||||
|
||||
params =
|
||||
params
|
||||
|> Map.put("exclude_types", Notification.masto_to_ap(params["exclude_types"]))
|
||||
|> Map.put("exclude_types", exclude_types)
|
||||
|
||||
notifications = Notification.for_user(user, params)
|
||||
|
||||
|
|
Loading…
Reference in New Issue