Add LastLogin to the User API (#7196)

This commit is contained in:
zeripath 2019-06-16 04:28:32 +01:00 committed by techknowlogick
parent 273f1997ff
commit cf2221e3ac
4 changed files with 19 additions and 0 deletions

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