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