From 15cf7d8449e2874e4af98b7571b130c3a8ee8909 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:22:09 +0800 Subject: [PATCH] fix bug for param name of enhanceList --- docs/uaw.md | 2 +- src/controllers/chest.controller.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/uaw.md b/docs/uaw.md index 2b18e97..6d2f571 100644 --- a/docs/uaw.md +++ b/docs/uaw.md @@ -501,7 +501,7 @@ body: ```js { - chestid: '12312313' // 宝箱id + chestId: '12312313' // 宝箱id } ``` diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index 527aed7..8067b36 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -42,7 +42,8 @@ class BoxController extends BaseController { @router('post /api/chest/enhance/list') async enhanceList(req) { const user = req.user - const { chestid } = req.query + let { chestId, chestid } = req.query + chestid = chestId || chestid if (!chestid) { throw new ZError(11, 'chestid is required') }