增加没有店铺id时的日志

This commit is contained in:
zhl 2021-05-28 13:50:37 +08:00
parent cc5ecd665c
commit 7f9431274e
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ class ExamController extends BaseController {
async list(req) { async list(req) {
let { shop, accountid, eid, delay } = req.params let { shop, accountid, eid, delay } = req.params
if (!shop || !validShopId(shop)) { if (!shop || !validShopId(shop)) {
throw new ZError(10, '没有店铺id或者店铺id格式不正确, 测试使用: 607ff59d4a4e16687a3b7079') throw new ZError(10, `begin exam 没有店铺id或者店铺id格式不正确, ${shop}`)
} }
const now = Date.now() const now = Date.now()
if (!eid) { if (!eid) {

View File

@ -49,7 +49,7 @@ class PuzzleController extends BaseController {
let { shop, level, accountid, type } = req.params let { shop, level, accountid, type } = req.params
level = +level || 1 level = +level || 1
if (!shop || !validShopId(shop)) { if (!shop || !validShopId(shop)) {
throw new ZError(10, '没有店铺id或者店铺id格式不正确, 测试使用: 607ff59d4a4e16687a3b7079') throw new ZError(10, `type: ${type} 没有店铺id或者店铺id格式不正确, ${shop}`)
} }
const cfg = fetchLevelCfg(level) const cfg = fetchLevelCfg(level)
let params = {} let params = {}

View File

@ -83,7 +83,7 @@ class ShopController extends BaseController {
async shopInfo(req) { async shopInfo(req) {
let { sid } = req.params let { sid } = req.params
if (!sid || !validShopId(sid)) { if (!sid || !validShopId(sid)) {
throw new ZError(10, '没有店铺id或者店铺id格式不正确, 测试使用: 607ff59d4a4e16687a3b7079') throw new ZError(10, `shopInfo 没有店铺id或者店铺id格式不正确: ${sid}`)
} }
let rspData: any = {} let rspData: any = {}
let shop = await Shop.fetchByID(sid) let shop = await Shop.fetchByID(sid)