Invert list users sort direction (make it desc)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-03-05 12:14:31 +01:00
parent f08b6334f0
commit 9c98f34b5c
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ defmodule MobilizonWeb.Schema.UserType do
arg(:limit, :integer, default_value: 10)
arg(:sort, :sortable_user_field, default_value: :id)
arg(:direction, :sort_direction, default_value: :asc)
arg(:direction, :sort_direction, default_value: :desc)
resolve(&User.list_and_count_users/3)
end

View File

@ -99,9 +99,9 @@ defmodule MobilizonWeb.Resolvers.UserResolverTest do
assert json_response(res, 200)["data"]["users"]["elements"]
|> Enum.map(& &1["email"]) == [
"riri@example.com",
"loulou@example.com",
"fifi@example.com",
"loulou@example.com"
"riri@example.com"
]
query = """