AdminAPI: sort user results by ID descending

This commit is contained in:
Alex Gleason 2021-07-13 21:37:25 -05:00
commit 5e88796784
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 58 additions and 71 deletions

View file

@ -23,7 +23,7 @@ defmodule Pleroma.Web.AdminAPI.Search do
|> Map.drop([:page, :page_size])
|> Map.put(:invisible, false)
|> User.Query.build()
|> order_by([u], u.nickname)
|> order_by(desc: :id)
paginated_query =
User.Query.paginate(query, params[:page] || 1, params[:page_size] || @page_size)