mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-14 02:41:06 +03:30
structure user and izitoast and add medicalcenter
This commit is contained in:
+17
-2
@@ -1,6 +1,8 @@
|
||||
import qs from 'qs';
|
||||
|
||||
const TOKEN_KEY = 'access_token'
|
||||
const REFRESH_TOKEN_KEY = 'refresh_token'
|
||||
|
||||
const INFO = 'info'
|
||||
/**
|
||||
* Manage the how Access Tokens are being stored and retreived from storage.
|
||||
*
|
||||
@@ -30,7 +32,20 @@ const TokenService = {
|
||||
|
||||
removeRefreshToken() {
|
||||
localStorage.removeItem(REFRESH_TOKEN_KEY)
|
||||
}
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
return qs.parse(localStorage.getItem(INFO))
|
||||
},
|
||||
|
||||
saveInfo(info = null) {
|
||||
info = qs.stringify(info);
|
||||
localStorage.setItem(INFO, info)
|
||||
},
|
||||
|
||||
removeInfo() {
|
||||
localStorage.removeItem(INFO)
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user