修复自动刷新问题

This commit is contained in:
eoao
2025-06-03 13:29:52 +08:00
parent 9b8598da57
commit 3190b47bb9
11 changed files with 45 additions and 38 deletions

View File

@@ -103,6 +103,7 @@ const userService = {
const { userId } = params
await accountService.physicsDeleteByUserIds(c, [userId])
await orm(c).delete(user).where(eq(user.userId, userId)).run();
await c.env.kv.delete(kvConst.AUTH_INFO + userId);
},
async list(c, params, userId) {
@@ -281,7 +282,7 @@ const userService = {
.run();
if (status === userConst.status.BAN) {
c.env.kv.delete(KvConst.AUTH_INFO + userId);
await c.env.kv.delete(KvConst.AUTH_INFO + userId);
}
},
@@ -301,14 +302,6 @@ const userService = {
.where(eq(user.userId, userId))
.run();
if (type) {
const authInfo = await c.env.kv.get(KvConst.AUTH_INFO + userId, { type: 'json' });
if (authInfo) {
authInfo.user.type = type;
await c.env.kv.put(KvConst.AUTH_INFO + userId, JSON.stringify(authInfo));
}
}
},
async incrUserService(c, quantity, userId) {