This commit is contained in:
yuexin 2021-03-12 18:16:17 +08:00
commit 6568dcd59b

View File

@ -4,7 +4,7 @@ import { BaseConst } from '../constants/BaseConst'
import { ZError } from '../common/ZError'
import { MatchCfg } from '../cfg/parsers/MatchCfg'
import { BagItem } from '../models/BagItem'
import { checkGameing, setGameing } from '../service/rank'
import { checkGameing, setGameEnd } from '../service/rank'
export default class MatchController extends BaseController {
@ -33,4 +33,12 @@ export default class MatchController extends BaseController {
return {}
}
@router('post /svr/:accountid/leftgame')
async userLeft(req: any) {
let { accountid, roomid } = req.params
console.log(`${roomid} player ${accountid} left game manul`)
await setGameEnd(accountid)
return {}
}
}