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

@ -6,16 +6,17 @@ import (
// User ...
type User struct {
ID string `json:"_id"`
Name string `json:"name"`
Phone string `json:"phone"`
Email string `json:"email"`
Status string `json:"status"`
Role RoleShort `json:"role"`
Other interface{} `json:"other"`
Avatar interface{} `json:"avatar"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ID string `json:"_id"`
Name string `json:"name"`
Phone string `json:"phone"`
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"`
UpdatedAt time.Time `json:"updatedAt"`
}
type (

View File

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