Add LastLogin to the User API (#7196)

This commit is contained in:
zeripath authored and techknowlogick committed 2019-06-15 23:28:32 -04:00
1 parent 273f1997ff
commit cf2221e3ac
4 files changed
+19

No files matched your search

+5
View File
@@ -6,6 +6,7 @@ package structs
import (
"encoding/json"
"time"
)
// User represents a user
@@ -25,6 +26,10 @@ type User struct {
Language string `json:"language"`
// Is the user an administrator
IsAdmin bool `json:"is_admin"`
// swagger:strfmt date-time
LastLogin time.Time `json:"last_login,omitempty"`
// swagger:strfmt date-time
Created time.Time `json:"created,omitempty"`
}
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility