diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index 8067b36..17249d2 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -101,7 +101,8 @@ class BoxController extends BaseController { if (chest.status === ChestStatusEnum.LOCKED) { throw new ZError(14, 'chest is locked') } - if (chest.user === uid) { + // 生产环境不能助力自己 + if (process.env.NODE_ENV === 'production' && chest.user === uid) { throw new ZError(15, 'can not enhance self') } const score = Math.floor(Math.random() * (chest.bounsCfg[1] - chest.bounsCfg[0] + 1) + chest.bounsCfg[0])