From 5227314a9067617c0d1fa19f1c7dbf3b9ebc32b0 Mon Sep 17 00:00:00 2001 From: alexeh Date: Tue, 12 Mar 2024 12:32:34 +0300 Subject: [PATCH] remove data root prop from dashboard responses --- api/src/modules/eudr-alerts/eudr.controller.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/api/src/modules/eudr-alerts/eudr.controller.ts b/api/src/modules/eudr-alerts/eudr.controller.ts index 41161456b..a0479b7c4 100644 --- a/api/src/modules/eudr-alerts/eudr.controller.ts +++ b/api/src/modules/eudr-alerts/eudr.controller.ts @@ -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 { + return this.dashboard.buildDashboard(dto); } @ApiOperation({ description: 'Get EUDR Dashboard Detail' }) @@ -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 { + return this.dashboard.buildDashboardDetail(supplierId, dto); } }