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

View File

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