From ef1b731202aec9b253302d05f59f96b75ed3fbc8 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=9D=E7=AE=B1=E5=8A=A9?= =?UTF-8?q?=E5=8A=9B=E8=AE=B0=E5=BD=95=E7=9A=84=E7=99=BB=E5=BD=95=E6=A3=80?= =?UTF-8?q?=E6=9F=A5,=20=E5=AE=9D=E7=AE=B1=E5=8A=A9=E5=8A=9B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=AE=9D=E7=AE=B1?= =?UTF-8?q?=E5=93=81=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/chest.controller.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index 5c2cc97..8db4955 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -62,9 +62,9 @@ class BoxController extends BaseController { /** * 宝箱助力列表 */ + @role(ROLE_ANON) @router('post /api/chest/enhance/list') async enhanceList(req) { - const user = req.user let { chestId, chestid } = req.params chestid = chestId || chestid if (!isObjectIdString(chestid)) { @@ -78,7 +78,7 @@ class BoxController extends BaseController { throw new ZError(13, 'chest is locked') } const result = [] - const records = await ChestEnhanceRecord.find({ chest: chest.id, activity: user.activity }).sort({ score: -1 }) + const records = await ChestEnhanceRecord.find({ chest: chest.id }).sort({ score: -1 }) const uids = records.map(record => record.user) const users = await ActivityUser.find({ _id: { $in: uids } }) const userMap = new Map() @@ -165,6 +165,7 @@ class BoxController extends BaseController { userCurrent, userMax, enhanced, + level: chest.level, nickname: chestOwner?.twitterName || chestOwner?.discordName || chestOwner?.address ? formatAddress(chestOwner.address) @@ -177,6 +178,7 @@ class BoxController extends BaseController { return { chestCurrent: chest.bonusUsers.length, chestMax: chest.maxBounsCount, + level: chest.level, nickname: chestOwner?.twitterName || chestOwner?.discordName || chestOwner?.address ? formatAddress(chestOwner.address)