Skip to content

Commit

Permalink
remove data root prop from dashboard responses
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Mar 12, 2024
1 parent 37647f8 commit 5227314
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions api/src/modules/eudr-alerts/eudr.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,8 @@ export class EudrController {
@Get('/dashboard')
async getDashboard(
@Query(ValidationPipe) dto: GetDashBoardDTO,
): Promise<{ data: EUDRDashboard }> {
const dashboard: EUDRDashboard = await this.dashboard.buildDashboard(dto);
return {
data: dashboard,
};
): Promise<EUDRDashboard> {
return this.dashboard.buildDashboard(dto);
}

@ApiOperation({ description: 'Get EUDR Dashboard Detail' })
Expand All @@ -263,11 +260,7 @@ export class EudrController {
async getDashboardDetail(
@Param('supplierId') supplierId: string,
@Query(ValidationPipe) dto: GetEUDRAlertDatesDto,
): Promise<{ data: EUDRDashBoardDetail }> {
const dashboard: EUDRDashBoardDetail =
await this.dashboard.buildDashboardDetail(supplierId, dto);
return {
data: dashboard,
};
): Promise<EUDRDashBoardDetail> {
return this.dashboard.buildDashboardDetail(supplierId, dto);
}
}

0 comments on commit 5227314

Please sign in to comment.