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);
 | 
			
		||||
 | 
			
		||||
    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;
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user