活动模式增加debug字段, 用于直接发送下一轮题目
This commit is contained in:
parent
2f6d511872
commit
8050ce9e23
@ -22,7 +22,7 @@ import {
|
|||||||
checkSingleFinish,
|
checkSingleFinish,
|
||||||
fetchLevelCfg,
|
fetchLevelCfg,
|
||||||
fetchSinglePuzzleType,
|
fetchSinglePuzzleType,
|
||||||
getRank,
|
getRank, sendOneQuestion,
|
||||||
startGame,
|
startGame,
|
||||||
transformRecord,
|
transformRecord,
|
||||||
updateSingleRank
|
updateSingleRank
|
||||||
@ -86,7 +86,7 @@ class PuzzleController extends BaseController {
|
|||||||
@role('anon')
|
@role('anon')
|
||||||
@router('post /api/:accountid/puzzle/answer')
|
@router('post /api/:accountid/puzzle/answer')
|
||||||
async report(req, res) {
|
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
|
mode = mode || 0
|
||||||
if (!id || !session) {
|
if (!id || !session) {
|
||||||
throw new ZError(11, 'param mismatch')
|
throw new ZError(11, 'param mismatch')
|
||||||
@ -136,6 +136,9 @@ class PuzzleController extends BaseController {
|
|||||||
// if (checkSubFinish(history, id)) {
|
// if (checkSubFinish(history, id)) {
|
||||||
// await sendOneQuestion(history)
|
// await sendOneQuestion(history)
|
||||||
// }
|
// }
|
||||||
|
if (debug) {
|
||||||
|
await sendOneQuestion(history)
|
||||||
|
}
|
||||||
} else if (mode == 0) {
|
} else if (mode == 0) {
|
||||||
gameResult = checkSingleFinish(history, accountid)
|
gameResult = checkSingleFinish(history, accountid)
|
||||||
if (gameResult) {
|
if (gameResult) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user