活动模式增加debug字段, 用于直接发送下一轮题目
This commit is contained in:
parent
2f6d511872
commit
8050ce9e23
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user