From e5e8bb4c4a0a3d835f57b58743e6d1c611306982 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 6 Jan 2025 03:38:22 +0100 Subject: [PATCH] no need to save when nothing was changed --- src/controllers/api/setBootLocationController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/setBootLocationController.ts b/src/controllers/api/setBootLocationController.ts index 4b1b3bc5..1baa5daa 100644 --- a/src/controllers/api/setBootLocationController.ts +++ b/src/controllers/api/setBootLocationController.ts @@ -16,8 +16,8 @@ export const setBootLocationController: RequestHandler = async (req, res) => { const inventory = await getInventory(accountId); if (inventory.Motorcycles.length == 0) { inventory.Motorcycles.push({ ItemType: "/Lotus/Types/Vehicles/Motorcycle/MotorcyclePowerSuit" }); + await inventory.save(); } - await inventory.save(); } res.end();