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 aa28bb7264
commit c7357cad55
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 = """