fix: claim recipe response
All checks were successful
Build / build (18) (push) Successful in 59s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 58s
Build / build (22) (pull_request) Successful in 53s
Build / build (22) (push) Successful in 38s
Build / build (20) (push) Successful in 59s
All checks were successful
Build / build (18) (push) Successful in 59s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 58s
Build / build (22) (pull_request) Successful in 53s
Build / build (22) (push) Successful in 38s
Build / build (20) (push) Successful in 59s
The client already 'knows' the ItemCount was decremented so when we also say it in the response, it actually ends up causing the client to think the recipe was used twice.
This commit is contained in:
parent
137213520e
commit
4c45c35f54
@ -95,16 +95,12 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
|
||||
|
||||
let InventoryChanges = {};
|
||||
if (recipe.consumeOnUse) {
|
||||
const recipeChanges = [
|
||||
addRecipes(inventory, [
|
||||
{
|
||||
ItemType: pendingRecipe.ItemType,
|
||||
ItemCount: -1
|
||||
}
|
||||
];
|
||||
|
||||
InventoryChanges = { ...InventoryChanges, Recipes: recipeChanges };
|
||||
|
||||
addRecipes(inventory, recipeChanges);
|
||||
]);
|
||||
}
|
||||
if (req.query.rush) {
|
||||
InventoryChanges = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user