This commit is contained in:
Peter Maquiran
2023-05-29 11:51:08 +01:00
parent b2da8463b4
commit ee14fbe8e7
11 changed files with 51 additions and 142 deletions
+5 -1
View File
@@ -43,11 +43,15 @@ class SessionService {
constructor() {
this.keyName = (SHA1("SessionService")).toString()
let restore = localstoreService.get(this.keyName, {})
let restore = this.getDataFromLocalStorage()
this._user = restore.user || new UserSession()
}
getDataFromLocalStorage() {
return localstoreService.get(this.keyName, {})
}
get user(): UserSession {
return this._user || new UserSession()
}