feat: json resposne
This commit is contained in:
@ -46,10 +46,12 @@ func (h *AuthHandler) getProfile(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
if err := json.NewEncoder(w).Encode(map[string]any{
|
||||
"full_name": user.FullName,
|
||||
"email": user.Email,
|
||||
"phoneNumber": user.PhoneNumber,
|
||||
"phone_number": user.PhoneNumber,
|
||||
"isAdmin": user.IsAdmin,
|
||||
"last_login": user.LastLogin,
|
||||
"profile_picture": user.ProfilePicture.String,
|
||||
|
Reference in New Issue
Block a user