chore: fix no-case-declarations warnings

This commit is contained in:
Sainan 2024-12-29 05:37:48 +01:00
parent dc85be8f37
commit b0c3e725f8
2 changed files with 6 additions and 3 deletions

View File

@ -9,15 +9,17 @@ const addItemController: RequestHandler = async (req, res) => {
const request = toAddItemRequest(req.body);
switch (request.type) {
case ItemType.Powersuit:
case ItemType.Powersuit: {
const powersuit = await addPowerSuit(request.InternalName, accountId);
res.json(powersuit);
return;
case ItemType.Weapon:
}
case ItemType.Weapon: {
const weaponType = getWeaponType(request.InternalName);
const weapon = await addEquipment(weaponType, request.InternalName, accountId);
res.json(weapon);
break;
}
default:
res.status(400).json({ error: "something went wrong" });
break;

View File

@ -262,7 +262,7 @@ export const addItem = async (
}
}
break;
case "Weapons":
case "Weapons": {
const weaponType = getWeaponType(typeName);
const weapon = await addEquipment(weaponType, typeName, accountId);
await updateSlots(accountId, InventorySlot.WEAPONS, 0, 1);
@ -272,6 +272,7 @@ export const addItem = async (
[weaponType]: [weapon]
}
};
}
case "Objects": {
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
const inventory = await getInventory(accountId);