Fix "the call ... will never return" warning
This commit is contained in:
parent
9b40e5f563
commit
59a149c69a
|
@ -18,7 +18,11 @@ defmacro not_empty_string(string) do
|
||||||
|
|
||||||
@spec user(map()) :: {:ok, [User.t()], pos_integer()}
|
@spec user(map()) :: {:ok, [User.t()], pos_integer()}
|
||||||
def user(params \\ %{}) do
|
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 =
|
paginated_query =
|
||||||
User.Query.paginate(query, params[:page] || 1, params[:page_size] || @page_size)
|
User.Query.paginate(query, params[:page] || 1, params[:page_size] || @page_size)
|
||||||
|
|
Loading…
Reference in New Issue