mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Pleroma.Web.MastodonAPI.FollowRequestController: fix dialyzer errors with replace_params: false
This commit is contained in:
parent
f400224a00
commit
14de8376ad
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestController do
|
|||
alias Pleroma.Web.CommonAPI
|
||||
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
||||
|
||||
plug(Pleroma.Web.ApiSpec.CastAndValidate)
|
||||
plug(Pleroma.Web.ApiSpec.CastAndValidate, replace_params: false)
|
||||
plug(:assign_follower when action != :index)
|
||||
|
||||
action_fallback(:errors)
|
||||
|
@ -44,7 +44,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestController do
|
|||
end
|
||||
end
|
||||
|
||||
defp assign_follower(%{params: %{id: id}} = conn, _) do
|
||||
defp assign_follower(%{private: %{open_api_spex: %{params: %{id: id}}}} = conn, _) do
|
||||
case User.get_cached_by_id(id) do
|
||||
%User{} = follower -> assign(conn, :follower, follower)
|
||||
nil -> Pleroma.Web.MastodonAPI.FallbackController.call(conn, {:error, :not_found}) |> halt()
|
||||
|
|
Loading…
Reference in a new issue