feat(auth): put login and register templates in files
This commit is contained in:
parent
b1e173f44b
commit
8ba6d4e4d9
6 changed files with 172 additions and 182 deletions
|
@ -30,10 +30,7 @@ export class AuthService {
|
|||
|
||||
// Check if token exists and load user data
|
||||
if (this.getToken()) {
|
||||
console.log('Token found, loading user data...');
|
||||
this.loadCurrentUser();
|
||||
} else {
|
||||
console.log('No token found, user not logged in.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,8 +85,7 @@ export class AuthService {
|
|||
next: (user) => {
|
||||
this.setUser(user);
|
||||
},
|
||||
error: (e) => {
|
||||
console.log(e);
|
||||
error: () => {
|
||||
this.logout();
|
||||
},
|
||||
});
|
||||
|
|
Reference in a new issue