modified: serv_nginx/api_bb/internal/handlers/avatar.go
add to response ok message
This commit is contained in:
@@ -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",
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user