修改step返回的错误码

This commit is contained in:
CounterFire2023 2024-04-23 18:35:12 +08:00
parent 37aca45c9d
commit fe75d261d5
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,6 @@ class BoxController extends BaseController {
})
// 20240328: 不再有上锁的箱子了
// for (let chest of chests) {
// // TODO:: 待规则确定后, 将符合条件的锁定的箱子解锁
// if (chest.status === 0) {
// if (user.allTaskFinished()) {
// chest.status = 1

View File

@ -404,8 +404,9 @@ class GameController extends BaseController {
includeResultMetadata: true,
},
)
// TODO:: check saveRes
console.log(saveRes)
if (!saveRes.lastErrorObject.updatedExisting) {
throw new ZError(17, 'insufficient tickets.')
}
await updateRankScore({
user: user.id,
score: score,