校验:添加接口校验

This commit is contained in:
luying
2022-07-26 20:47:01 +08:00
parent 1e74a3a20c
commit 19323ef71e
30 changed files with 1693 additions and 108 deletions
@@ -53,7 +53,6 @@ export class ShopHandler {
let serverId = session.get('serverId');
let { activityId = 0, shopItemId, count } = msg;
if( count < 0) return resResult(STATUS.WRONG_PARMS);
let dicShopItem = await getShopDicById(activityId, shopItemId, roleId, serverId);
if(!dicShopItem) return STATUS.DIC_DATA_NOT_FOUND;
@@ -95,7 +94,6 @@ export class ShopHandler {
let roleName = session.get('roleName');
let sid = session.get('sid');
let { goodsId, count } = msg;
if(!count || count < 0) return resResult(STATUS.WRONG_PARMS);
let dicGoods = gameData.goods.get(goodsId);
if(!dicGoods) return resResult(STATUS.DIC_DATA_NOT_FOUND);