diff --git a/apps/api-gateway/src/ecosystem/ecosystem.controller.ts b/apps/api-gateway/src/ecosystem/ecosystem.controller.ts index c4ef3d490..b8e628997 100644 --- a/apps/api-gateway/src/ecosystem/ecosystem.controller.ts +++ b/apps/api-gateway/src/ecosystem/ecosystem.controller.ts @@ -543,7 +543,7 @@ export class EcosystemController { @Delete('/:ecosystemId/:orgId/invitations/:invitationId') @ApiOperation({ summary: 'Delete ecosystem pending invitations', description: 'Delete ecosystem pending invitations' }) - @ApiResponse({ status: 200, description: 'Success', type: ApiResponseDto }) + @ApiResponse({ status: HttpStatus.OK, description: 'Success', type: ApiResponseDto }) @UseGuards(AuthGuard('jwt'), EcosystemRolesGuard, OrgRolesGuard) @EcosystemsRoles(EcosystemRoles.ECOSYSTEM_OWNER, EcosystemRoles.ECOSYSTEM_LEAD) @Roles(OrgRoles.OWNER) @@ -554,12 +554,13 @@ export class EcosystemController { @Param('orgId') orgId: string, @Res() res: Response): Promise { - await this.ecosystemService.deleteEcosystemInvitations(invitationId); + const deletedEcosystemInvitationResponse = await this.ecosystemService.deleteEcosystemInvitations(invitationId); const finalResponse: IResponse = { - statusCode: 200, - message: ResponseMessages.ecosystem.success.delete + statusCode: HttpStatus.OK, + message: ResponseMessages.ecosystem.success.delete, + data:deletedEcosystemInvitationResponse }; - return res.status(200).json(finalResponse); + return res.status(HttpStatus.OK).json(finalResponse); } diff --git a/apps/ecosystem/src/ecosystem.repository.ts b/apps/ecosystem/src/ecosystem.repository.ts index 40079ed95..4d672de01 100644 --- a/apps/ecosystem/src/ecosystem.repository.ts +++ b/apps/ecosystem/src/ecosystem.repository.ts @@ -867,6 +867,9 @@ async findEcosystemMembers( status: EcosystemInvitationStatus.PENDING } }); + + delete deletedInvitation.lastChangedBy; + delete deletedInvitation.lastChangedDateTime; return deletedInvitation; } catch (error) { this.logger.error(`error: ${JSON.stringify(error)}`);