diff --git a/src/api/controllers/puzzle.controller.ts b/src/api/controllers/puzzle.controller.ts index 4d358a0..eb5c879 100644 --- a/src/api/controllers/puzzle.controller.ts +++ b/src/api/controllers/puzzle.controller.ts @@ -8,23 +8,15 @@ import { import { ZError } from '../../common/ZError' import { BaseConst } from '../../constants/BaseConst' import { mission_vo } from '../../config/parsers/mission_vo' -import { - createRoom, joinRoom, - updateScore -} from '../../services/WsSvr' +import { createRoom, joinRoom, updateScore } from '../../services/WsSvr' import { RoomState } from '../../services/RoomState' import { retry } from '../../utils/promise.util' import { RoomLockErr } from '../../common/RoomLockErr' import { Schedule } from '../../clock/Schedule' -import { - checkSubFinish, sendOneQuestion, - startGame, - transformRecord -} from '../../services/GameLogic' +import { startGame, transformRecord } from '../../services/GameLogic' import { ObjectId } from 'bson' - class PuzzleController extends BaseController { @role('anon') @router('post /api/:accountid/puzzle/list') @@ -139,7 +131,7 @@ class PuzzleController extends BaseController { @role('anon') @router('post /api/:accountid/puzzle/match') async joinMultipleGame(req, res) { - const { shop, accountid, debug_begin_sec } = req.params + const { shop, accountid, debug_begin_sec, debug_qcount } = req.params let data: any = { shop, maxTime: 3600 } let beginSecond = (debug_begin_sec ? +debug_begin_sec : 20) beginSecond = (Math.max(2, beginSecond)) * 1000 @@ -201,7 +193,7 @@ class PuzzleController extends BaseController { history.members.set(accountid, memberData) history.room = roomId //TODO: 根据配置赋值 - history.total = 10 + history.total = debug_qcount || 10 history.begin = Date.now() + beginSecond beginTime = history.begin history.expire = history.begin + (100 || 90) * 1000