From ceaa17267533bec86954077ff7c36949765f1b2e Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 8 May 2025 13:56:26 +0200 Subject: [PATCH] chore: remove query for ship in getShipController 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. --- src/controllers/api/getShipController.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/api/getShipController.ts b/src/controllers/api/getShipController.ts index c68ff789..ca22ec3d 100644 --- a/src/controllers/api/getShipController.ts +++ b/src/controllers/api/getShipController.ts @@ -3,7 +3,6 @@ import { config } from "@/src/services/configService"; import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService"; -import { getShip } from "@/src/services/shipService"; import { toOid } from "@/src/helpers/inventoryHelpers"; import { IGetShipResponse } from "@/src/types/shipTypes"; import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; @@ -21,7 +20,6 @@ export const getShipController: RequestHandler = async (req, res) => { const personalRooms = personalRoomsDb.toJSON(); const loadout = await getLoadout(accountId); - const ship = await getShip(personalRoomsDb.activeShipId, "ShipAttachments SkinFlavourItem"); const getShipResponse: IGetShipResponse = { ShipOwnerId: accountId, @@ -31,8 +29,8 @@ export const getShipController: RequestHandler = async (req, res) => { ShipId: toOid(personalRoomsDb.activeShipId), ShipInterior: { Colors: personalRooms.ShipInteriorColors, - ShipAttachments: ship.ShipAttachments, - SkinFlavourItem: ship.SkinFlavourItem + ShipAttachments: { HOOD_ORNAMENT: "" }, + SkinFlavourItem: "" }, FavouriteLoadoutId: personalRooms.Ship.FavouriteLoadoutId ? toOid(personalRooms.Ship.FavouriteLoadoutId)