Add new frontend - fix 5

This commit is contained in:
Urtzi Alfaro
2025-07-22 10:17:41 +02:00
parent 52232815a2
commit 915be54349
5 changed files with 4 additions and 17 deletions

View File

@@ -32,7 +32,7 @@ class AuthService {
formData.append('password', credentials.password);
formData.append('grant_type', 'password');
const response = await fetch('/api/auth/token', {
const response = await fetch('/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
@@ -55,12 +55,6 @@ class AuthService {
async register(data: RegisterData): Promise<UserProfile> {
const response = await apiClient.post('/auth/register', data);
// Auto-login after registration
await this.login({
email: data.email,
password: data.password
});
return response;
}