Fix: logout err

This commit is contained in:
Unitwk 2024-08-02 10:41:57 +08:00
parent 7c54c59fc9
commit 1f4e534787
2 changed files with 6 additions and 3 deletions

View File

@ -290,7 +290,7 @@
"TXT_CODE_d07742fe": "服务端配置文件",
"TXT_CODE_1deaa2dd": "用户",
"TXT_CODE_236f70aa": "用户配置",
"TXT_CODE_342a04a9": "维护中",
"TXT_CODE_342a04a9": "故障中",
"TXT_CODE_15f2e564": "未运行",
"TXT_CODE_a409b8a9": "停止中",
"TXT_CODE_175b570d": "启动中",
@ -1401,7 +1401,7 @@
"TXT_CODE_c17f6488": "选择 zip 文件",
"TXT_CODE_cbbc779f": "填写好服务端软件文件名后,再前往文件管理上传服务端软件即可开启实例。",
"TXT_CODE_5a74975b": "创建实例",
"TXT_CODE_c534ca49": "正在维护中",
"TXT_CODE_c534ca49": "网络故障中",
"TXT_CODE_c237192c": "请输入新实例的名字",
"TXT_CODE_f878fd4c": "正在安装中",
"TXT_CODE_7078fd28": "安装错误",

View File

@ -98,6 +98,7 @@ export function logout(ctx: Koa.ParameterizedContext): boolean {
ctx.session["userName"] = null;
ctx.session["uuid"] = null;
ctx.session["token"] = null;
ctx.session.maxAge = 0;
ctx.session.save();
return true;
}
@ -122,7 +123,9 @@ export async function register(
});
return {
uuid
uuid,
userName,
permission
};
}
return false;