Check session expiration and update if still valid
This commit is contained in:
parent
53b4036fcb
commit
590fda99fd
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
apiUrl: 'http://localhost:3000/api'
|
apiUrl: '/api'
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue