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) {