О себе, редактирование в профиле

This commit is contained in:
Халимов Рустам
2026-04-17 00:26:38 +03:00
parent 7225e3272e
commit ca9cf27716
3 changed files with 14 additions and 2 deletions
@@ -14,9 +14,13 @@ export class UserApi {
static async updateProfile(data: { displayName?: string; bio?: string; birthday?: string | null }) {
// Конечная точка в новом бэкенде: PUT /api/profiles/profile
const payload = {
...data,
about: data.bio // Дублируем для совместимости
};
return httpClient.request<User>('/profiles/profile', {
method: 'PUT',
body: JSON.stringify(data),
body: JSON.stringify(payload),
});
}