From 8050ce9e2349a207350c739aaa560cd7cad60262 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 21 May 2021 10:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=A8=A1=E5=BC=8F=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0debug=E5=AD=97=E6=AE=B5,=20=E7=94=A8=E4=BA=8E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=8F=91=E9=80=81=E4=B8=8B=E4=B8=80=E8=BD=AE=E9=A2=98?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/controllers/puzzle.controller.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/controllers/puzzle.controller.ts b/src/api/controllers/puzzle.controller.ts index aa37a33..4b02145 100644 --- a/src/api/controllers/puzzle.controller.ts +++ b/src/api/controllers/puzzle.controller.ts @@ -22,7 +22,7 @@ import { checkSingleFinish, fetchLevelCfg, fetchSinglePuzzleType, - getRank, + getRank, sendOneQuestion, startGame, transformRecord, updateSingleRank @@ -86,7 +86,7 @@ class PuzzleController extends BaseController { @role('anon') @router('post /api/:accountid/puzzle/answer') async report(req, res) { - let { id, answer, type, session, accountid, mode } = req.params + let { id, answer, type, session, accountid, mode, debug } = req.params mode = mode || 0 if (!id || !session) { throw new ZError(11, 'param mismatch') @@ -136,6 +136,9 @@ class PuzzleController extends BaseController { // if (checkSubFinish(history, id)) { // await sendOneQuestion(history) // } + if (debug) { + await sendOneQuestion(history) + } } else if (mode == 0) { gameResult = checkSingleFinish(history, accountid) if (gameResult) {