修改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: 不再有上锁的箱子了 // 20240328: 不再有上锁的箱子了
// for (let chest of chests) { // for (let chest of chests) {
// // TODO:: 待规则确定后, 将符合条件的锁定的箱子解锁
// if (chest.status === 0) { // if (chest.status === 0) {
// if (user.allTaskFinished()) { // if (user.allTaskFinished()) {
// chest.status = 1 // chest.status = 1

View File

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