From 5b1c7275fa5377c9f1eb876601d5a89744b59bc6 Mon Sep 17 00:00:00 2001 From: VampireKitten Date: Fri, 21 Jun 2024 22:40:16 +0200 Subject: [PATCH] Fixed errors and added option to WebUI --- src/controllers/api/getCreditsController.ts | 4 ++-- src/services/configService.ts | 1 + static/webui/index.html | 16 +++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/controllers/api/getCreditsController.ts b/src/controllers/api/getCreditsController.ts index 38aa0e9f..ae7d06e5 100644 --- a/src/controllers/api/getCreditsController.ts +++ b/src/controllers/api/getCreditsController.ts @@ -23,6 +23,7 @@ export const getCreditsController: RequestHandler = async (req, res) => { return; } + const inventory = await getInventory(accountId); if (config.infinitePlatinum) { res.json({ RegularCredits: inventory.RegularCredits, @@ -32,8 +33,7 @@ export const getCreditsController: RequestHandler = async (req, res) => { }); return; } - - const inventory = await getInventory(accountId); + res.json({ RegularCredits: inventory.RegularCredits, TradesRemaining: inventory.TradesRemaining, diff --git a/src/services/configService.ts b/src/services/configService.ts index 785c0f0b..ee727cb6 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -33,6 +33,7 @@ interface IConfig { unlockAllQuests?: boolean; completeAllQuests?: boolean; infiniteResources?: boolean; + infinitePlatinum?: boolean; unlockAllShipFeatures?: boolean; unlockAllShipDecorations?: boolean; unlockAllFlavourItems?: boolean; diff --git a/static/webui/index.html b/static/webui/index.html index d19f125a..57cdbd84 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -231,9 +231,11 @@
- + +
+
+ +
@@ -241,9 +243,7 @@
- +
@@ -254,9 +254,7 @@
- +