mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-05 16:39:47 +00:00
Pleroma.Web.ControllerHelper: fix @spec to resolve dialyzer errors
lib/pleroma/web/admin_api/controllers/user_controller.ex:333:no_return Function index/2 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:357:unused_fun Function maybe_parse_filters/1 will never be called. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:366:no_return Function page_params/1 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:368:call The function call will not succeed. Pleroma.Web.ControllerHelper.fetch_integer_param(_params :: any(), :page, 1) breaks the contract (map(), String.t(), integer() | nil) :: integer() | nil
This commit is contained in:
parent
3b9d991514
commit
c6f783c551
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ defmodule Pleroma.Web.ControllerHelper do
|
|||
|> json(json)
|
||||
end
|
||||
|
||||
@spec fetch_integer_param(map(), String.t(), integer() | nil) :: integer() | nil
|
||||
@spec fetch_integer_param(map(), String.t() | atom(), integer() | nil) :: integer() | nil
|
||||
def fetch_integer_param(params, name, default \\ nil) do
|
||||
params
|
||||
|> Map.get(name, default)
|
||||
|
|
Loading…
Reference in a new issue