From a5acaa906deb075604d556d725dbd764efa72fff Mon Sep 17 00:00:00 2001 From: Art Date: Sun, 12 Sep 2021 12:22:19 +0300 Subject: [PATCH] 103. Add user to local cache (#12) --- .../src/app/service/authentication.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support-portal-frontend/src/app/service/authentication.service.ts b/support-portal-frontend/src/app/service/authentication.service.ts index 4df7ab2..047e82e 100644 --- a/support-portal-frontend/src/app/service/authentication.service.ts +++ b/support-portal-frontend/src/app/service/authentication.service.ts @@ -43,4 +43,7 @@ export class AuthenticationService { this.storage.setItem(this.JWT_TOKEN_STORAGE_KEY, token); } + public addUserToLocalStorage(user: User) { + this.storage.setItem("user", JSON.stringify(user)); + } }