fix: WebUI offering to add amps, which would fail

This commit is contained in:
Sainan 2024-05-07 16:31:40 +02:00
parent 2130a5fbdd
commit 290e83e139
2 changed files with 2 additions and 2 deletions

View File

@ -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"))
}); });
}; };

View File

@ -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();