修改宝箱助力的错误码

This commit is contained in:
CounterFire2023 2024-04-23 16:43:13 +08:00
parent 1bc3cfa4a9
commit 1a4da3ca73

View File

@ -230,7 +230,7 @@ class BoxController extends BaseController {
throw new ZError(10, 'user already enhanced')
}
if (chest.bonusUsers.length >= chest.maxBounsCount) {
throw new ZError(13, 'enhanced times exceed')
throw new ZError(17, 'enhanced times exceed')
}
if (chest.status === ChestStatusEnum.OPENED) {
throw new ZError(14, 'chest already opened')
@ -240,7 +240,7 @@ class BoxController extends BaseController {
}
// 生产环境不能助力自己
if (process.env.NODE_ENV === 'production' && chest.user === uid) {
throw new ZError(15, 'can not enhance self')
throw new ZError(18, 'can not enhance self')
}
const userMax = user.twitterId && user.discordId ? MAX_ENHANCE_COUNT_ADV : MAX_ENHANCE_COUNT_BASE
const dateTag = formatDate(new Date())