set premiumPurchase parameter in a few more places
All checks were successful
Build / build (18) (push) Successful in 39s
Build / build (22) (push) Successful in 52s
Build / build (20) (push) Successful in 56s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 49s
Build / build (22) (pull_request) Successful in 1m1s

This commit is contained in:
Sainan 2025-02-26 14:58:03 +01:00
parent b1f6ffec8e
commit 7f6bb5f6cc
3 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
}
InventoryChanges = {
...InventoryChanges,
...(await addItem(inventory, recipe.resultType, recipe.num)).InventoryChanges
...(await addItem(inventory, recipe.resultType, recipe.num, false)).InventoryChanges
};
await inventory.save();
res.json({ InventoryChanges });

View File

@ -7,7 +7,7 @@ export const addItemsController: RequestHandler = async (req, res) => {
const requests = req.body as IAddItemRequest[];
const inventory = await getInventory(accountId);
for (const request of requests) {
await addItem(inventory, request.ItemType, request.ItemCount);
await addItem(inventory, request.ItemType, request.ItemCount, true);
}
await inventory.save();
res.end();

View File

@ -533,9 +533,9 @@ export const addItems = async (
let inventoryDelta;
for (const item of items) {
if (typeof item === "string") {
inventoryDelta = await addItem(inventory, item);
inventoryDelta = await addItem(inventory, item, 1, true);
} else {
inventoryDelta = await addItem(inventory, item.ItemType, item.ItemCount);
inventoryDelta = await addItem(inventory, item.ItemType, item.ItemCount, true);
}
combineInventoryChanges(inventoryChanges, inventoryDelta.InventoryChanges);
}