feat: profile picture
This commit is contained in:
@ -49,6 +49,7 @@ func (h *AuthHandler) getProfile(w http.ResponseWriter, r *http.Request) {
|
|||||||
"phoneNumber": user.PhoneNumber,
|
"phoneNumber": user.PhoneNumber,
|
||||||
"isAdmin": user.IsAdmin,
|
"isAdmin": user.IsAdmin,
|
||||||
"last_login": user.LastLogin,
|
"last_login": user.LastLogin,
|
||||||
|
"profile_picture": user.ProfilePicture.String,
|
||||||
"updated_at": user.UpdatedAt,
|
"updated_at": user.UpdatedAt,
|
||||||
"created_at": user.CreatedAt,
|
"created_at": user.CreatedAt,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
@ -127,6 +128,7 @@ func (h *AuthHandler) login(w http.ResponseWriter, r *http.Request) {
|
|||||||
FullName string `json:"full_name"`
|
FullName string `json:"full_name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
|
ProfilePicture string `json:"profile_picture"`
|
||||||
// Avatar
|
// Avatar
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,6 +138,7 @@ func (h *AuthHandler) login(w http.ResponseWriter, r *http.Request) {
|
|||||||
FullName: user.FullName,
|
FullName: user.FullName,
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Id: user.ID.String(),
|
Id: user.ID.String(),
|
||||||
|
ProfilePicture: user.ProfilePicture.String,
|
||||||
// Avatar
|
// Avatar
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
web.Error(w, "failed to encode response", http.StatusInternalServerError)
|
web.Error(w, "failed to encode response", http.StatusInternalServerError)
|
||||||
|
Reference in New Issue
Block a user