Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
modified isLoggedIn function to check for auth token, log in page now…
… removes auth token on init
  • Loading branch information
ema14006 committed Apr 29, 2019
1 parent b99cad3 commit faeb48b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/authentication/authentication.component.ts
Expand Up @@ -54,6 +54,7 @@ export class AuthenticationComponent implements OnInit {
localStorage.removeItem('gen_name'); localStorage.removeItem('gen_name');
localStorage.removeItem('data_type'); localStorage.removeItem('data_type');
localStorage.removeItem('fault_type'); localStorage.removeItem('fault_type');
localStorage.removeItem('auth_token');
} }


} }
2 changes: 1 addition & 1 deletion src/app/header/header.component.ts
Expand Up @@ -25,7 +25,7 @@ export class HeaderComponent implements OnInit {
} }
isLoggedIn() isLoggedIn()
{ {
if(this.router.url != '/' && this.router.url != '/#') if(localStorage.getItem('auth_token'))
{ {
return true; return true;
} }
Expand Down

0 comments on commit faeb48b

Please sign in to comment.