Show user connection IP and date in admin

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-31 16:57:13 +02:00
parent 5de5d31dd8
commit aa7d919c98
6 changed files with 38 additions and 4 deletions

View File

@@ -83,6 +83,16 @@ defmodule Mobilizon.GraphQL.Schema.UserType do
field(:settings, :user_settings, description: "The list of settings for this user") do
resolve(&User.user_settings/3)
end
field(:last_sign_in_at, :datetime, description: "When the user previously signed-in")
field(:last_sign_in_ip, :string, description: "The IP adress the user previously sign-in with")
field(:current_sign_in_at, :datetime, description: "When the user currenlty signed-in")
field(:current_sign_in_ip, :string,
description: "The IP adress the user's currently signed-in with"
)
end
enum :user_role do