Pleroma.Web.MastodonAPI.AccountController: fix dialyzer errors with replace_params: false
This commit is contained in:
parent
cfe7438b2f
commit
81c8592d69
2 changed files with 57 additions and 16 deletions
|
|
@ -85,8 +85,8 @@ defmodule Pleroma.Web.ControllerHelper do
|
|||
end
|
||||
end
|
||||
|
||||
def assign_account_by_id(conn, _) do
|
||||
case Pleroma.User.get_cached_by_id(conn.params.id) do
|
||||
def assign_account_by_id(%{private: %{open_api_spex: %{params: %{id: id}}}} = conn, _) do
|
||||
case Pleroma.User.get_cached_by_id(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