eslint
All checks were successful
Build / build (pull_request) Successful in 1m2s

This commit is contained in:
AMelonInsideLemon 2025-08-15 07:07:14 +02:00
parent c7258a9749
commit 1c6d4b1ac1

View File

@ -58,8 +58,7 @@ import {
IPlanterClient, IPlanterClient,
IPlanterDatabase, IPlanterDatabase,
ITailorShop, ITailorShop,
ITailorShopDatabase, ITailorShopDatabase
TPersonalRoomsDatabaseDocument
} from "@/src/types/personalRoomsTypes"; } from "@/src/types/personalRoomsTypes";
const convertDate = (value: IMongoDate): Date => { const convertDate = (value: IMongoDate): Date => {
@ -450,12 +449,10 @@ export const importLoadOutPresets = (db: ILoadoutDatabase, client: ILoadOutPrese
const convertShip = (client: IOrbiterClient): IOrbiterDatabase => { const convertShip = (client: IOrbiterClient): IOrbiterDatabase => {
return { return {
...client, ...client,
ShipInterior: client.ShipInterior ShipInterior: {
? { ...client.ShipInterior,
...client.ShipInterior, Colors: Array.isArray(client.ShipInterior.Colors) ? {} : client.ShipInterior.Colors
Colors: Array.isArray(client.ShipInterior.Colors) ? {} : client.ShipInterior.Colors },
}
: undefined,
FavouriteLoadoutId: client.FavouriteLoadoutId ? new Types.ObjectId(client.FavouriteLoadoutId.$oid) : undefined FavouriteLoadoutId: client.FavouriteLoadoutId ? new Types.ObjectId(client.FavouriteLoadoutId.$oid) : undefined
}; };
}; };
@ -484,8 +481,8 @@ const convertFavouriteLoadout = (client: IFavouriteLoadout): IFavouriteLoadoutDa
const convertApartment = (client: IApartmentClient): IApartmentDatabase => { const convertApartment = (client: IApartmentClient): IApartmentDatabase => {
return { return {
...client, ...client,
Gardening: client.Gardening ? { Planters: client.Gardening.Planters.map(convertPlanter) } : { Planters: [] }, Gardening: { Planters: client.Gardening.Planters.map(convertPlanter) },
FavouriteLoadouts: client.FavouriteLoadouts ? client.FavouriteLoadouts.map(convertFavouriteLoadout) : [] FavouriteLoadouts: client.FavouriteLoadouts.map(convertFavouriteLoadout)
}; };
}; };
@ -493,7 +490,7 @@ const convertTailorShop = (client: ITailorShop): ITailorShopDatabase => {
return { return {
...client, ...client,
Colors: Array.isArray(client.Colors) ? {} : client.Colors, Colors: Array.isArray(client.Colors) ? {} : client.Colors,
FavouriteLoadouts: client.FavouriteLoadouts ? client.FavouriteLoadouts.map(convertFavouriteLoadout) : [] FavouriteLoadouts: client.FavouriteLoadouts.map(convertFavouriteLoadout)
}; };
}; };