diff options
author | Sonja Galovic <galovicsonja@gmail.com> | 2022-04-06 23:15:10 +0200 |
---|---|---|
committer | Sonja Galovic <galovicsonja@gmail.com> | 2022-04-06 23:15:10 +0200 |
commit | 588b9528bc39acc04a94ad8d996333bb4e4764e7 (patch) | |
tree | fc22da9be2a8bd96c2c77bb377a7f90e9e475b4d /frontend/src/app/_services | |
parent | 052c97eadc3784306607fab2fd725d3cfa592867 (diff) |
Dodata funkcionalnost cuvanja dataseta (prvo se cuva pa se bira). Izmenjeni datatable, dataset-load i add-new-dataset-component
Diffstat (limited to 'frontend/src/app/_services')
-rw-r--r-- | frontend/src/app/_services/auth.service.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontend/src/app/_services/auth.service.ts b/frontend/src/app/_services/auth.service.ts index ccfbe15f..a108f8db 100644 --- a/frontend/src/app/_services/auth.service.ts +++ b/frontend/src/app/_services/auth.service.ts @@ -33,6 +33,7 @@ export class AuthService { var token = this.cookie.get('token'); var property=jwtHelper.decodeToken(this.cookie.get('token')); var username=property['name']; + var userId = property['id']; return !jwtHelper.isTokenExpired(token) && username!=""; } return false; @@ -89,6 +90,7 @@ export class AuthService { console.log("decoded:", decodedToken); this.shared.loggedIn = this.isAuthenticated(); this.shared.username = decodedToken.name; + this.shared.userId = decodedToken.id; this.enableAutoRefresh(); } } |