From 590fda99fd189f20ff12d589e245ec97b4482827 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Fri, 12 Feb 2021 22:26:34 -0700 Subject: [PATCH] Check session expiration and update if still valid --- src/client/app/app.component.ts | 2 +- src/client/environments/environment.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/app.component.ts b/src/client/app/app.component.ts index 720cb56..111bf78 100644 --- a/src/client/app/app.component.ts +++ b/src/client/app/app.component.ts @@ -43,7 +43,7 @@ export class AppComponent implements OnInit { let auth = this.storage.getItem('Authorization'); let userId = this.storage.getItem('userId'); let savedUser = JSON.parse(this.storage.getItem('user')) as User; - if (auth && auth.length == 255 && userId) { + if (auth) { if (savedUser) { this.user.next(savedUser); } diff --git a/src/client/environments/environment.ts b/src/client/environments/environment.ts index e07c867..1f61f0e 100644 --- a/src/client/environments/environment.ts +++ b/src/client/environments/environment.ts @@ -4,7 +4,7 @@ export const environment = { production: false, - apiUrl: 'http://localhost:3000/api' + apiUrl: '/api' }; /*