modified: serv_nginx/api_bb/internal/handlers/avatar.go

add to response ok message
This commit is contained in:
2025-10-13 01:17:58 +05:00
parent e13545c5f1
commit 39df128e1e
@@ -72,7 +72,9 @@ func (h *AvatarHandler) UploadAvatar(w http.ResponseWriter, r *http.Request) {
return
}
// Возвращаем ответ с полем success
utils.RespondWithJSON(w, http.StatusOK, map[string]interface{}{
"success": true,
"message": "Avatar uploaded successfully",
"avatar": avatarPath,
})
@@ -91,7 +93,9 @@ func (h *AvatarHandler) DeleteAvatar(w http.ResponseWriter, r *http.Request) {
return
}
// Возвращаем ответ с полем success
utils.RespondWithJSON(w, http.StatusOK, map[string]interface{}{
"success": true,
"message": "Avatar deleted successfully",
})
}