Attempt to fix auth

This commit is contained in:
2025-07-17 21:49:49 -07:00
parent a4d7dd7973
commit 7491e78dba
3 changed files with 7 additions and 4 deletions
@@ -21,7 +21,10 @@ export class LogoutComponent {
} }
ngAfterViewInit(){ ngAfterViewInit(){
this.auth.Logout(); this.auth.Logout().subscribe({
next: data => {
this.router.navigate(["/"]); this.router.navigate(["/"]);
} }
});
}
} }
@@ -14,7 +14,7 @@ import { CommonModule } from '@angular/common';
export class PrivacyComponent { export class PrivacyComponent {
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title ) { 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(){ Logout(){
this.http.post<Account>( "api/account/logout", {}, { responseType: 'json' } ).subscribe( );
this._user.next( new Account ); this._user.next( new Account );
this.delUserFromStorage(); this.delUserFromStorage();
return this.http.post<Account>( "api/account/logout", {}, { responseType: 'json' } );
} }
get isLoggedIn(): boolean { get isLoggedIn(): boolean {