feat: json resposne

This commit is contained in:
2025-05-28 17:40:24 +02:00
parent 595015f324
commit 2187c873ee

View File

@ -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,