事件上报接口增加id的检查
This commit is contained in:
parent
b5cb5aad52
commit
69378f3d6b
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user