From 37dd52606557b7cd9077b6f2838e759c23207ad6 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Mon, 4 Apr 2022 04:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=83=E5=BA=A6=E7=BB=9F=E8=AE=A1=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9B=BE=E5=83=8F=E7=B4=A0=E6=9D=90=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin.js | 17 ----------------- index.js | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/apps/admin.js b/apps/admin.js index bcb668e8..2161f981 100644 --- a/apps/admin.js +++ b/apps/admin.js @@ -28,25 +28,8 @@ export async function userStat(e) { } } -export async function rebuildCookie(e) { - if (!await e.checkAuth({ - auth: "master" - })) return true; - let count = 0; - for (let qq in NoteCookie) { - let uid = NoteCookie[qq].uid; - if (uid) { - redis.set(`genshin:uid:${qq}`, uid, { EX: 2592000 }); - redis.set(`genshin:qq-uid:${qq}`, uid, { EX: 2592000 }); - redis.set(`genshin:uid-qq:${uid}`, qq, { EX: 2592000 }); - count++; - } - } - e.reply(`重建${count}个缓存`) -} - export async function userStatus(e, { Models }) { if (!await e.checkAuth({ auth: "master" diff --git a/index.js b/index.js index 9b4d59ee..fa90b14e 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ import { character, wife, wifeReg } from "./apps/character.js"; -import { userStat, rebuildCookie, userStatus, userCacheRebuild, mysUserCk } from "./apps/admin.js"; +import { userStat, userStatus, userCacheRebuild, mysUserCk } from "./apps/admin.js"; -export { character, userStat, rebuildCookie, wife, userStatus, userCacheRebuild, mysUserCk }; +export { character, userStat, wife, userStatus, userCacheRebuild, mysUserCk }; export const rule = {