fix: fix stupid ahh bug where u get logged out when doing fucking anything stupid fucking http interceptor
This commit is contained in:
parent
3b95725d88
commit
29a53ea781
4 changed files with 15 additions and 15 deletions
|
@ -8,8 +8,8 @@ import { AuthResponse } from '../model/auth/AuthResponse';
|
|||
import { User } from '../model/User';
|
||||
import { environment } from '@environments/environment';
|
||||
|
||||
const TOKEN_KEY = 'auth-token';
|
||||
const USER_KEY = 'auth-user';
|
||||
const TOKEN_KEY = 'token';
|
||||
const USER_KEY = 'user';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -88,7 +88,8 @@ export class AuthService {
|
|||
next: (user) => {
|
||||
this.setUser(user);
|
||||
},
|
||||
error: () => {
|
||||
error: (e) => {
|
||||
console.log(e);
|
||||
this.logout();
|
||||
},
|
||||
});
|
||||
|
|
Reference in a new issue