|
|
|
@@ -26,7 +26,7 @@ export class AccountService { |
|
|
|
} |
|
|
|
|
|
|
|
login(email: string, password: string) { |
|
|
|
return this.http.post<User>(`${environment.basePath}/auth`, { email, password }) |
|
|
|
return this.http.post<User>(`${environment.apiUrl}/auth`, { email, password }) |
|
|
|
.pipe(map(user => { |
|
|
|
// store user details and jwt token in local storage to keep user logged in between page refreshes |
|
|
|
localStorage.setItem('user', JSON.stringify(user)); |
|
|
|
|