fix: 修改config和推出登陆
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user