Fix "the call ... will never return" warning
This commit is contained in:
parent
9b40e5f563
commit
59a149c69a
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ defmodule Pleroma.Web.AdminAPI.Search do
|
|||
|
||||
@spec user(map()) :: {:ok, [User.t()], pos_integer()}
|
||||
def user(params \\ %{}) do
|
||||
query = User.Query.build(params) |> order_by([u], u.nickname)
|
||||
query =
|
||||
params
|
||||
|> Map.drop([:page, :page_size])
|
||||
|> User.Query.build()
|
||||
|> order_by([u], u.nickname)
|
||||
|
||||
paginated_query =
|
||||
User.Query.paginate(query, params[:page] || 1, params[:page_size] || @page_size)
|
||||
|
|
Loading…
Reference in a new issue