From c264b7df27c6def495ccc3aea6455a15242b1b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D0=B8=D0=BC=D0=BE=D0=B2=20=D0=A0=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BC?= Date: Fri, 17 Apr 2026 00:37:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B8=D0=BB=D1=8F=D1=86=D0=B8=D0=B8=20TypeScript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client-web/src/modules/auth/infrastructure/authApi.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client-web/src/modules/auth/infrastructure/authApi.ts b/client-web/src/modules/auth/infrastructure/authApi.ts index 1bbd788..f918efb 100644 --- a/client-web/src/modules/auth/infrastructure/authApi.ts +++ b/client-web/src/modules/auth/infrastructure/authApi.ts @@ -3,7 +3,7 @@ import type { User } from '../../../core/domain/types'; export class AuthApi { static async login(username: string, password: string) { - const response = await httpClient.request<{ accessToken: string; userId: string; username: string; displayName: string }>('/auth/login', { + const response = await httpClient.request('/auth/login', { method: 'POST', body: JSON.stringify({ username, password }), }); @@ -16,12 +16,12 @@ export class AuthApi { username: response.username || (response as any).userName, displayName: response.displayName, avatar: response.avatar || null - } as User + } as unknown as User }; } static async register(username: string, displayName: string, password: string, bio?: string) { - const response = await httpClient.request<{ accessToken: string; userId: string; username: string; displayName: string }>('/auth/register', { + const response = await httpClient.request('/auth/register', { method: 'POST', body: JSON.stringify({ username, displayName, password, bio }), }); @@ -34,7 +34,7 @@ export class AuthApi { username: response.username || (response as any).userName, displayName: response.displayName, avatar: response.avatar || null - } as User + } as unknown as User }; } @@ -47,7 +47,7 @@ export class AuthApi { username: response.username || response.userName, displayName: response.displayName, avatar: response.avatar || response.avatarUrl - } as User, + } as unknown as User, token: response.accessToken }; }