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)