Skip to content

Commit

Permalink
wrap eudr alert dates in data prop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Mar 7, 2024
1 parent c8d07bc commit 316a403
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions api/src/modules/eudr-alerts/eudr.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ export class EudrController {
@Get('/dates')
async getAlertDates(
@Query(ValidationPipe) dto: GetEUDRAlertsDto,
): Promise<EUDRAlertDates[]> {
return this.eudrAlertsService.getDates(dto);
): Promise<{ data: EUDRAlertDates[] }> {
const dates: EUDRAlertDates[] = await this.eudrAlertsService.getDates(dto);
return {
data: dates,
};
}

@Get('/alerts')
Expand Down
2 changes: 1 addition & 1 deletion api/src/modules/eudr-alerts/eudr.repositoty.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ApiProperty } from '@nestjs/swagger';

class DateValue {
@ApiProperty()
value: Date | string;
value: Date;
}

export class EUDRAlertDates {
Expand Down

0 comments on commit 316a403

Please sign in to comment.