Add LastLogin to the User API (#7196)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user