fix: WebUI offering to add amps, which would fail
This commit is contained in:
parent
2130a5fbdd
commit
290e83e139
@ -18,7 +18,7 @@ function reduceItems(items: MinItem[]): ListedItem[] {
|
|||||||
const getItemListsController: RequestHandler = (_req, res) => {
|
const getItemListsController: RequestHandler = (_req, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
warframes: reduceItems(warframes),
|
warframes: reduceItems(warframes),
|
||||||
weapons: reduceItems(weapons)
|
weapons: reduceItems(weapons.filter(item => item.productCategory != "OperatorAmps"))
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ export const addWeapon = async (
|
|||||||
weaponIndex = inventory.Melee.push({ ItemType: weaponName, Configs: [], XP: 0 });
|
weaponIndex = inventory.Melee.push({ ItemType: weaponName, Configs: [], XP: 0 });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error("unknown weapon type");
|
throw new Error("unknown weapon type: " + weaponType);
|
||||||
}
|
}
|
||||||
|
|
||||||
const changedInventory = await inventory.save();
|
const changedInventory = await inventory.save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user