projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b40e5f
)
Fix "the call ... will never return" warning
author
Maxim Filippov
<colixer@gmail.com>
Wed, 30 Oct 2019 23:25:15 +0000
(
02:25
+0300)
committer
Maxim Filippov
<colixer@gmail.com>
Wed, 30 Oct 2019 23:25:15 +0000
(
02:25
+0300)
lib/pleroma/web/admin_api/search.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/admin_api/search.ex
b/lib/pleroma/web/admin_api/search.ex
index ed919833e895c2c4d8b3867a71c07145b1ab99d4..778cf4c36c94a6b4e183a46ca7a69347b14e532e 100644
(file)
--- a/
lib/pleroma/web/admin_api/search.ex
+++ b/
lib/pleroma/web/admin_api/search.ex
@@
-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)