diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-07 19:25:58 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-07 19:25:58 +0100 |
commit | 7ce6eb09b198e796301dbd7c3e4b23441e2d46ae (patch) | |
tree | 1f44e61b56441e48160863db533a48d4ace077ff /frontend/src/app/_services/auth.service.ts | |
parent | 5e13228f88cc0be48b12809c73b97eff50ce8bf1 (diff) |
Linked frontend to backend, but backend needs to enable CORS.
Diffstat (limited to 'frontend/src/app/_services/auth.service.ts')
-rw-r--r-- | frontend/src/app/_services/auth.service.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |