Check session expiration and update if still valid

This commit is contained in:
William Brawner 2021-02-12 22:26:34 -07:00
parent 53b4036fcb
commit 590fda99fd
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ export class AppComponent implements OnInit {
let auth = this.storage.getItem('Authorization'); let auth = this.storage.getItem('Authorization');
let userId = this.storage.getItem('userId'); let userId = this.storage.getItem('userId');
let savedUser = JSON.parse(this.storage.getItem('user')) as User; let savedUser = JSON.parse(this.storage.getItem('user')) as User;
if (auth && auth.length == 255 && userId) { if (auth) {
if (savedUser) { if (savedUser) {
this.user.next(savedUser); this.user.next(savedUser);
} }

View file

@ -4,7 +4,7 @@
export const environment = { export const environment = {
production: false, production: false,
apiUrl: 'http://localhost:3000/api' apiUrl: '/api'
}; };
/* /*