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