diff --git a/src/sunrise-sunset/sunrise-sunset.controller.ts b/src/sunrise-sunset/sunrise-sunset.controller.ts index 9d0ff78..be2df76 100644 --- a/src/sunrise-sunset/sunrise-sunset.controller.ts +++ b/src/sunrise-sunset/sunrise-sunset.controller.ts @@ -15,7 +15,8 @@ export class SunriseSunsetController { constructor(private sunriseSunsetService: SunriseSunsetService) {} @Get() - async get(@Query() { startDate, endDate }: QueryParameters): Promise { - return this.sunriseSunsetService.getSunriseSunsets(parseISO(startDate), parseISO(endDate)) + async get(@Query() { startDate, endDate }: QueryParameters) { + const result = await this.sunriseSunsetService.getSunriseSunsets(parseISO(startDate), parseISO(endDate)) + return Object.fromEntries(result) } }