forked from OpenWF/SpaceNinjaServer
		
	chore: remove query for ship in getShipController (#2022)
as far as I can tell, the ShipAttachments and SkinFlavourItem are just here due to the fact that the type from ShipExterior is being reused, but they aren't actually needed because the interior can't have attachments or flavour items - and if it could, they would be different from the exterior anyway. Reviewed-on: OpenWF/SpaceNinjaServer#2022 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									bdd5ade2eb
								
							
						
					
					
						commit
						8d788d38a5
					
				@ -3,7 +3,6 @@ import { config } from "@/src/services/configService";
 | 
				
			|||||||
import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
 | 
					import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
				
			||||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
					import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
				
			||||||
import { getShip } from "@/src/services/shipService";
 | 
					 | 
				
			||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
				
			||||||
import { IGetShipResponse } from "@/src/types/shipTypes";
 | 
					import { IGetShipResponse } from "@/src/types/shipTypes";
 | 
				
			||||||
import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
					import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
				
			||||||
@ -21,7 +20,6 @@ export const getShipController: RequestHandler = async (req, res) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const personalRooms = personalRoomsDb.toJSON<IPersonalRoomsClient>();
 | 
					    const personalRooms = personalRoomsDb.toJSON<IPersonalRoomsClient>();
 | 
				
			||||||
    const loadout = await getLoadout(accountId);
 | 
					    const loadout = await getLoadout(accountId);
 | 
				
			||||||
    const ship = await getShip(personalRoomsDb.activeShipId, "ShipAttachments SkinFlavourItem");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const getShipResponse: IGetShipResponse = {
 | 
					    const getShipResponse: IGetShipResponse = {
 | 
				
			||||||
        ShipOwnerId: accountId,
 | 
					        ShipOwnerId: accountId,
 | 
				
			||||||
@ -31,8 +29,8 @@ export const getShipController: RequestHandler = async (req, res) => {
 | 
				
			|||||||
            ShipId: toOid(personalRoomsDb.activeShipId),
 | 
					            ShipId: toOid(personalRoomsDb.activeShipId),
 | 
				
			||||||
            ShipInterior: {
 | 
					            ShipInterior: {
 | 
				
			||||||
                Colors: personalRooms.ShipInteriorColors,
 | 
					                Colors: personalRooms.ShipInteriorColors,
 | 
				
			||||||
                ShipAttachments: ship.ShipAttachments,
 | 
					                ShipAttachments: { HOOD_ORNAMENT: "" },
 | 
				
			||||||
                SkinFlavourItem: ship.SkinFlavourItem
 | 
					                SkinFlavourItem: ""
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            FavouriteLoadoutId: personalRooms.Ship.FavouriteLoadoutId
 | 
					            FavouriteLoadoutId: personalRooms.Ship.FavouriteLoadoutId
 | 
				
			||||||
                ? toOid(personalRooms.Ship.FavouriteLoadoutId)
 | 
					                ? toOid(personalRooms.Ship.FavouriteLoadoutId)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user