mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 04:03:42 +08:00
feat: midjourney image upscale function is ready
This commit is contained in:
@@ -4,26 +4,16 @@
|
||||
* storage handler
|
||||
*/
|
||||
|
||||
const SessionUserKey = 'LOGIN_USER';
|
||||
const SessionUserKey = 'SESSION_ID';
|
||||
|
||||
export function getSessionId() {
|
||||
const user = getLoginUser();
|
||||
return user ? user['session_id'] : '';
|
||||
return sessionStorage.getItem(SessionUserKey)
|
||||
}
|
||||
|
||||
export function removeLoginUser() {
|
||||
sessionStorage.removeItem(SessionUserKey)
|
||||
}
|
||||
|
||||
export function getLoginUser() {
|
||||
const value = sessionStorage.getItem(SessionUserKey);
|
||||
if (value) {
|
||||
return JSON.parse(value);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function setLoginUser(user) {
|
||||
sessionStorage.setItem(SessionUserKey, JSON.stringify(user))
|
||||
export function setSessionId(sessionId) {
|
||||
sessionStorage.setItem(SessionUserKey, sessionId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user