Add new frontend - fix 13
This commit is contained in:
@@ -50,14 +50,20 @@ export class AuthService {
|
||||
/**
|
||||
* User registration
|
||||
*/
|
||||
async register(userData: RegisterRequest): Promise<UserProfile> {
|
||||
const response = await apiClient.post<ApiResponse<UserProfile>>(
|
||||
async register(userData: RegisterRequest): Promise<TokenResponse> {
|
||||
const response = await apiClient.post<ApiResponse<TokenResponse>>(
|
||||
'/auth/register',
|
||||
userData
|
||||
);
|
||||
return response.data!;
|
||||
|
||||
// Store tokens after successful registration
|
||||
const tokenData = response.data!;
|
||||
await tokenManager.storeTokens(tokenData);
|
||||
|
||||
return tokenData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Refresh access token
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user