From aa5e1a55ae0a219a868e086c7a73f94532f7582a Mon Sep 17 00:00:00 2001 From: An Duong Date: Tue, 28 Nov 2023 16:56:34 -0500 Subject: [PATCH] Fix gql airportWeather --- src/@generated/graphql/models/AirportWeather.ts | 1 - src/services/airport.weather/get.airport.weather.ts | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/@generated/graphql/models/AirportWeather.ts b/src/@generated/graphql/models/AirportWeather.ts index 4e84ddc..bb15830 100644 --- a/src/@generated/graphql/models/AirportWeather.ts +++ b/src/@generated/graphql/models/AirportWeather.ts @@ -1,5 +1,4 @@ import { Field, ObjectType, ID, Int } from 'type-graphql'; -import { GQL_Airport } from './Airport'; @ObjectType('AirportWeather') export class GQL_AirportWeather { diff --git a/src/services/airport.weather/get.airport.weather.ts b/src/services/airport.weather/get.airport.weather.ts index cc16f5e..76f882e 100644 --- a/src/services/airport.weather/get.airport.weather.ts +++ b/src/services/airport.weather/get.airport.weather.ts @@ -113,23 +113,12 @@ export async function getAirportWeather( const { airportIata, date, hour, month, year } = params; const airportWeather = await prisma.airportWeather.findFirst({ - select: { + include: { Airport: { select: { timezone: true, }, }, - airportIata: true, - date: true, - hour: true, - iconURL: true, - month: true, - precipitationAmountMillimeter: true, - status: true, - updatedAt: true, - windFromDirectionDegrees: true, - windSpeedMeterPerSecond: true, - year: true, }, where: { airportIata,