forked from OpenWF/SpaceNinjaServer
chore: fix no-case-declarations warnings
This commit is contained in:
parent
dc85be8f37
commit
b0c3e725f8
@ -9,15 +9,17 @@ const addItemController: RequestHandler = async (req, res) => {
|
|||||||
const request = toAddItemRequest(req.body);
|
const request = toAddItemRequest(req.body);
|
||||||
|
|
||||||
switch (request.type) {
|
switch (request.type) {
|
||||||
case ItemType.Powersuit:
|
case ItemType.Powersuit: {
|
||||||
const powersuit = await addPowerSuit(request.InternalName, accountId);
|
const powersuit = await addPowerSuit(request.InternalName, accountId);
|
||||||
res.json(powersuit);
|
res.json(powersuit);
|
||||||
return;
|
return;
|
||||||
case ItemType.Weapon:
|
}
|
||||||
|
case ItemType.Weapon: {
|
||||||
const weaponType = getWeaponType(request.InternalName);
|
const weaponType = getWeaponType(request.InternalName);
|
||||||
const weapon = await addEquipment(weaponType, request.InternalName, accountId);
|
const weapon = await addEquipment(weaponType, request.InternalName, accountId);
|
||||||
res.json(weapon);
|
res.json(weapon);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
res.status(400).json({ error: "something went wrong" });
|
res.status(400).json({ error: "something went wrong" });
|
||||||
break;
|
break;
|
||||||
|
@ -262,7 +262,7 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Weapons":
|
case "Weapons": {
|
||||||
const weaponType = getWeaponType(typeName);
|
const weaponType = getWeaponType(typeName);
|
||||||
const weapon = await addEquipment(weaponType, typeName, accountId);
|
const weapon = await addEquipment(weaponType, typeName, accountId);
|
||||||
await updateSlots(accountId, InventorySlot.WEAPONS, 0, 1);
|
await updateSlots(accountId, InventorySlot.WEAPONS, 0, 1);
|
||||||
@ -272,6 +272,7 @@ export const addItem = async (
|
|||||||
[weaponType]: [weapon]
|
[weaponType]: [weapon]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
case "Objects": {
|
case "Objects": {
|
||||||
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user