fix: 修改config和推出登陆

This commit is contained in:
2025-03-22 19:49:35 +08:00
parent d739bd12b3
commit 5f63c4cf4b
6 changed files with 92 additions and 42 deletions

View File

@@ -99,7 +99,15 @@ app
key: 'logout',
})
.define(async (ctx) => {
const { tokens = [] } = ctx.query?.data || {};
clearCookie(ctx);
for (const token of tokens) {
await User.oauth.delToken(token);
}
ctx.body = {
code: 200,
message: 'Logout Success',
};
})
.addTo(app);
app