Attempt to fix auth
This commit is contained in:
@@ -21,7 +21,10 @@ export class LogoutComponent {
|
||||
}
|
||||
|
||||
ngAfterViewInit(){
|
||||
this.auth.Logout();
|
||||
this.auth.Logout().subscribe({
|
||||
next: data => {
|
||||
this.router.navigate(["/"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import { CommonModule } from '@angular/common';
|
||||
export class PrivacyComponent {
|
||||
|
||||
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title ) {
|
||||
this.title.setTitle("Contact | BoredCareers");
|
||||
this.title.setTitle("Privacy | BoredCareers");
|
||||
};
|
||||
|
||||
}
|
||||
@@ -35,9 +35,9 @@ export class Authentication{
|
||||
}
|
||||
|
||||
Logout(){
|
||||
this.http.post<Account>( "api/account/logout", {}, { responseType: 'json' } ).subscribe( );
|
||||
this._user.next( new Account );
|
||||
this.delUserFromStorage();
|
||||
return this.http.post<Account>( "api/account/logout", {}, { responseType: 'json' } );
|
||||
}
|
||||
|
||||
get isLoggedIn(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user