diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index cb0e181..cd2ed27 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -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 diff --git a/src/controllers/game.controller.ts b/src/controllers/game.controller.ts index f983378..efffbb6 100644 --- a/src/controllers/game.controller.ts +++ b/src/controllers/game.controller.ts @@ -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,