Add LastLogin to the User API (#7196)
This commit is contained in:
parent
273f1997ff
commit
cf2221e3ac
4 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue