事件上报接口增加id的检查

This commit is contained in:
zhl 2021-02-03 20:01:12 +08:00
parent b5cb5aad52
commit 69378f3d6b

View File

@ -6,12 +6,14 @@ import { ZError } from '../common/ZError'
import { ItemInfo } from '../logic/ItemDef'
import ItemCtrl from '../logic/ItemCtrl'
import { BagItem } from '../models/BagItem'
import assert from 'assert'
export default class ActivityController extends BaseController {
@router('post /api/:accountid/update_event')
async generalEvent(req: any) {
let { id,accountid } = req.params
assert(id, 'id requiresd')
let cfgMap = global.$cfg.get(BaseConst.INCOME)
id = +id
if (!cfgMap.has(id)) {