ensure Rush request has CategoryItemId
This commit is contained in:
parent
67a733009d
commit
26cb7ada92
@ -305,10 +305,10 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
|||||||
guild.ActiveDojoColorResearch = data.RecipeType;
|
guild.ActiveDojoColorResearch = data.RecipeType;
|
||||||
await guild.save();
|
await guild.save();
|
||||||
res.end();
|
res.end();
|
||||||
} else if (data.Action == "Rush") {
|
} else if (data.Action == "Rush" && data.CategoryItemId) {
|
||||||
const inventoryChanges: IInventoryChanges = {
|
const inventoryChanges: IInventoryChanges = {
|
||||||
...updateCurrency(inventory, 20, true),
|
...updateCurrency(inventory, 20, true),
|
||||||
...claimSalvagedComponent(inventory, data.CategoryItemId!)
|
...claimSalvagedComponent(inventory, data.CategoryItemId)
|
||||||
};
|
};
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({
|
res.json({
|
||||||
@ -316,7 +316,7 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logger.debug(`data provided to ${req.path}: ${String(req.body)}`);
|
logger.debug(`data provided to ${req.path}: ${String(req.body)}`);
|
||||||
throw new Error(`unknown guildTech action: ${data.Action}`);
|
throw new Error(`unhandled guildTech request`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user