diff --git a/src/controllers/api/inventorySlotsController.ts b/src/controllers/api/inventorySlotsController.ts index 3face44e..e7591b30 100644 --- a/src/controllers/api/inventorySlotsController.ts +++ b/src/controllers/api/inventorySlotsController.ts @@ -21,13 +21,12 @@ import { logger } from "@/src/utils/logger"; export const inventorySlotsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const body = JSON.parse(req.body as string) as IInventorySlotsRequest; - - if (body.Bin != InventorySlot.SUITS && body.Bin != InventorySlot.PVE_LOADOUTS) { - logger.warn(`unexpected slot purchase of type ${body.Bin}, account may be overcharged`); - } + + const slotCost = body.Bin == InventorySlot.SUITS || body.Bin == InventorySlot.MECHSUITS || + body.Bin == InventorySlot.PVE_LOADOUTS || body.Bin == InventorySlot.CREWMEMBERS ? 20 : 12; const inventory = await getInventory(accountId); - const currencyChanges = updateCurrency(inventory, 20, true); + const currencyChanges = updateCurrency(inventory, slotCost, true); updateSlots(inventory, body.Bin, 1, 1); await inventory.save();