diff --git a/bookstore-api/.idea/workspace.xml b/bookstore-api/.idea/workspace.xml
index cfbff25..d3c9c70 100644
--- a/bookstore-api/.idea/workspace.xml
+++ b/bookstore-api/.idea/workspace.xml
@@ -1007,12 +1007,12 @@
-
+
-
+
diff --git a/store-front/src/app/components/my-profile/my-profile.component.ts b/store-front/src/app/components/my-profile/my-profile.component.ts
index 8e12dfb..20e6297 100644
--- a/store-front/src/app/components/my-profile/my-profile.component.ts
+++ b/store-front/src/app/components/my-profile/my-profile.component.ts
@@ -274,6 +274,8 @@ export class MyProfileComponent implements OnInit {
},
error => {
this.loggedIn=false;
+ console.log("inactive session");
+ this.router.navigate(['/myAccount']);
}
);
diff --git a/store-front/src/app/services/login.service.ts b/store-front/src/app/services/login.service.ts
index 71caa35..b57de39 100644
--- a/store-front/src/app/services/login.service.ts
+++ b/store-front/src/app/services/login.service.ts
@@ -2,13 +2,13 @@ import { Injectable } from '@angular/core';
import {Http, Headers} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import {AppConst} from '../constants/app-const';
-
+import {Router} from "@angular/router";
@Injectable()
export class LoginService {
private serverPath:string = AppConst.serverPath;
- constructor (private http: Http) {}
+ constructor (private http: Http, private router:Router) {}
sendCredential(username: string, password: string) {
let url = this.serverPath+"/token";