bug fix in enhance list

This commit is contained in:
CounterFire2023 2024-03-27 13:43:19 +08:00
parent 4968dae33e
commit b44faefbbb

View File

@ -42,10 +42,10 @@ class BoxController extends BaseController {
@router('post /api/chest/enhance/list') @router('post /api/chest/enhance/list')
async enhanceList(req) { async enhanceList(req) {
const user = req.user const user = req.user
let { chestId, chestid } = req.query let { chestId, chestid } = req.params
chestid = chestId || chestid chestid = chestId || chestid
if (!chestid) { if (!chestid) {
throw new ZError(11, 'chestid is required') throw new ZError(11, 'chestId is required')
} }
const chest = await ActivityChest.findById(chestid) const chest = await ActivityChest.findById(chestid)
if (!chest) { if (!chest) {