fix: returning givekeychainitem response
This commit is contained in:
parent
eb56442d63
commit
9f0be223e6
@ -10,7 +10,7 @@ export const giveKeyChainTriggeredItemsController: RequestHandler = async (req,
|
|||||||
const keyChainInfo = getJSONfromString<IKeyChainRequest>((req.body as string).toString());
|
const keyChainInfo = getJSONfromString<IKeyChainRequest>((req.body as string).toString());
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
const inventoryChanges = giveKeyChainItem(inventory, keyChainInfo);
|
const inventoryChanges = await giveKeyChainItem(inventory, keyChainInfo);
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
res.send(inventoryChanges);
|
res.send(inventoryChanges);
|
||||||
|
@ -138,6 +138,8 @@ export const giveKeyChainItem = async (inventory: TInventoryDatabaseDocument, ke
|
|||||||
// items were added: update quest stage's i (item was given)
|
// items were added: update quest stage's i (item was given)
|
||||||
updateQuestStage(inventory, keyChainInfo, { i: true });
|
updateQuestStage(inventory, keyChainInfo, { i: true });
|
||||||
|
|
||||||
|
return inventoryChanges;
|
||||||
|
|
||||||
//TODO: Check whether Wishlist is used to track items which should exist uniquely in the inventory
|
//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
|
some items are added or removed (not sure) to the wishlist, in that case a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user