no need to save when nothing was changed

This commit is contained in:
Sainan 2025-01-06 03:38:22 +01:00
parent bda7cea90e
commit e5e8bb4c4a

View File

@ -16,9 +16,9 @@ export const setBootLocationController: RequestHandler = async (req, res) => {
const inventory = await getInventory(accountId); const inventory = await getInventory(accountId);
if (inventory.Motorcycles.length == 0) { if (inventory.Motorcycles.length == 0) {
inventory.Motorcycles.push({ ItemType: "/Lotus/Types/Vehicles/Motorcycle/MotorcyclePowerSuit" }); inventory.Motorcycles.push({ ItemType: "/Lotus/Types/Vehicles/Motorcycle/MotorcyclePowerSuit" });
}
await inventory.save(); await inventory.save();
} }
}
res.end(); res.end();
}; };