mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Fix
This commit is contained in:
@@ -72,7 +72,7 @@ export class AuthService {
|
|||||||
response.BasicAuthKey = user.BasicAuthKey
|
response.BasicAuthKey = user.BasicAuthKey
|
||||||
this.ValidatedUser = response;
|
this.ValidatedUser = response;
|
||||||
|
|
||||||
this.localstoreService.set('user',response)
|
this.localstoreService.set('user', response)
|
||||||
|
|
||||||
this.storageService.store(AuthConnstants.USER, response);
|
this.storageService.store(AuthConnstants.USER, response);
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,22 @@ import { AES, enc, SHA1 } from 'crypto-js'
|
|||||||
})
|
})
|
||||||
export class LocalstoreService {
|
export class LocalstoreService {
|
||||||
|
|
||||||
private prefix = 'v0-'
|
private prefix = 'v2-'
|
||||||
|
|
||||||
constructor() { }
|
constructor() {
|
||||||
|
const key = SHA1('version').toString()
|
||||||
|
|
||||||
|
if(this.get(key, false)) {
|
||||||
|
// alert('new Update')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.set(key, this.prefix)
|
||||||
|
}
|
||||||
|
|
||||||
getKey(keyName) {
|
getKey(keyName) {
|
||||||
return this.prefix + keyName
|
return this.prefix + keyName
|
||||||
}
|
}
|
||||||
|
|
||||||
get( keyName, safe) {
|
get( keyName, safe) {
|
||||||
|
|
||||||
keyName = this.getKey(keyName)
|
keyName = this.getKey(keyName)
|
||||||
@@ -30,6 +39,8 @@ export class LocalstoreService {
|
|||||||
return decryptedData;
|
return decryptedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return safe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user