feat: midjourney image upscale function is ready

This commit is contained in:
RockYang
2023-08-15 15:28:40 +08:00
parent 6c76086916
commit 827acdd3f9
16 changed files with 227 additions and 109 deletions

View File

@@ -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)
}