update UserRes

This commit is contained in:
Hoang 2021-11-29 10:01:04 +07:00
parent 8201b658b2
commit 4d632ed042
2 changed files with 16 additions and 14 deletions

View File

@ -12,6 +12,7 @@ type User struct {
Email string `json:"email"`
Status string `json:"status"`
Role RoleShort `json:"role"`
RequireToChangePassword bool `json:"requireToChangePassword"`
Other interface{} `json:"other"`
Avatar interface{} `json:"avatar"`
CreatedAt time.Time `json:"createdAt"`

View File

@ -179,6 +179,7 @@ func getResponse(ctx context.Context, user model.DBUser) model.User {
Level: roleRaw.Level,
IsAdmin: roleRaw.IsAdmin,
},
RequireToChangePassword: user.RequireToChangePassword,
Avatar: user.Avatar,
Other: user.Other,
CreatedAt: user.CreatedAt,