Add backend to list an user's pictures

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-23 10:38:01 +01:00
parent 846f7b71f3
commit 6a1cd42d2c
5 changed files with 62 additions and 2 deletions

View File

@@ -110,6 +110,16 @@ defmodule Mobilizon.GraphQL.Schema.UserType do
field(:current_sign_in_ip, :string,
description: "The IP adress the user's currently signed-in with"
)
field(:media, :paginated_picture_list, description: "The user's media objects") do
arg(:page, :integer,
default_value: 1,
description: "The page in the paginated user media list"
)
arg(:limit, :integer, default_value: 10, description: "The limit of user media per page")
resolve(&User.user_medias/3)
end
end
@desc "The list of roles an user can have"