Use atoms as keys in ActivityPub.fetch_* functions options
This commit is contained in:
parent
f5cb1f3616
commit
317e2b8d61
27 changed files with 538 additions and 636 deletions
|
|
@ -81,8 +81,7 @@ defmodule Pleroma.Web.ControllerHelper do
|
|||
end
|
||||
|
||||
def assign_account_by_id(conn, _) do
|
||||
# TODO: use `conn.params[:id]` only after moving to OpenAPI
|
||||
case Pleroma.User.get_cached_by_id(conn.params[:id] || conn.params["id"]) do
|
||||
case Pleroma.User.get_cached_by_id(conn.params.id) do
|
||||
%Pleroma.User{} = account -> assign(conn, :account, account)
|
||||
nil -> Pleroma.Web.MastodonAPI.FallbackController.call(conn, {:error, :not_found}) |> halt()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue