fix: returning givekeychainitem response
All checks were successful
Build / build (20) (push) Successful in 36s
Build / build (18) (push) Successful in 1m1s
Build / build (22) (push) Successful in 1m4s
Build Docker image / docker (push) Successful in 34s

This commit is contained in:
Ordis 2025-02-21 15:46:09 +01:00
parent eb56442d63
commit 9f0be223e6
2 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,7 @@ export const giveKeyChainTriggeredItemsController: RequestHandler = async (req,
const keyChainInfo = getJSONfromString<IKeyChainRequest>((req.body as string).toString());
const inventory = await getInventory(accountId);
const inventoryChanges = giveKeyChainItem(inventory, keyChainInfo);
const inventoryChanges = await giveKeyChainItem(inventory, keyChainInfo);
await inventory.save();
res.send(inventoryChanges);

View File

@ -138,6 +138,8 @@ export const giveKeyChainItem = async (inventory: TInventoryDatabaseDocument, ke
// items were added: update quest stage's i (item was given)
updateQuestStage(inventory, keyChainInfo, { i: true });
return inventoryChanges;
//TODO: Check whether Wishlist is used to track items which should exist uniquely in the inventory
/*
some items are added or removed (not sure) to the wishlist, in that case a