匹配增加测试用的题目数量
This commit is contained in:
parent
32c2662a6f
commit
bbb80f3314
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user