From 7ec4cd9299a901b07f1517293753b9be2f766c20 Mon Sep 17 00:00:00 2001 From: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:45:32 +0800 Subject: [PATCH] setAccountCheatController type check --- src/controllers/custom/setAccountCheatController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/custom/setAccountCheatController.ts b/src/controllers/custom/setAccountCheatController.ts index 07a1da4f..4ad41d17 100644 --- a/src/controllers/custom/setAccountCheatController.ts +++ b/src/controllers/custom/setAccountCheatController.ts @@ -8,7 +8,7 @@ export const setAccountCheatController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const payload = req.body as ISetAccountCheatRequest; const inventory = await getInventory(accountId, payload.key); - inventory[payload.key] = payload.value; + inventory[payload.key] = payload.value as never; await inventory.save(); res.end(); if (["infiniteCredits", "infinitePlatinum", "infiniteEndo", "infiniteRegalAya"].indexOf(payload.key) != -1) { @@ -18,5 +18,5 @@ export const setAccountCheatController: RequestHandler = async (req, res) => { interface ISetAccountCheatRequest { key: keyof IAccountCheats; - value: boolean; + value: boolean | number; }