From 7ce6eb09b198e796301dbd7c3e4b23441e2d46ae Mon Sep 17 00:00:00 2001 From: Danijel Andjelkovic Date: Mon, 7 Mar 2022 19:25:58 +0100 Subject: Linked frontend to backend, but backend needs to enable CORS. --- frontend/src/app/_services/auth.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/src/app/_services/auth.service.ts') diff --git a/frontend/src/app/_services/auth.service.ts b/frontend/src/app/_services/auth.service.ts index d1012d37..7129b95b 100644 --- a/frontend/src/app/_services/auth.service.ts +++ b/frontend/src/app/_services/auth.service.ts @@ -14,11 +14,11 @@ export class AuthService { constructor(private http: HttpClient, private cookie: CookieService) { } login(username: string, password: string) { - return this.http.post(`${API_SETTINGS.apiURL}/login`, { username, password }); + return this.http.post(`${API_SETTINGS.apiURL}/auth/login`, { username, password }, { responseType: 'text' }); } register(user: any) { - return this.http.post(`${API_SETTINGS.apiURL}/register`, user); + return this.http.post(`${API_SETTINGS.apiURL}/auth/register`, user); } isAuthenticated(): boolean { -- cgit v1.2.3