From ba038b152dde4abfe86d0668acdbf835bd50a987 Mon Sep 17 00:00:00 2001 From: sujitaw Date: Wed, 4 Mar 2026 18:51:41 +0530 Subject: [PATCH 1/3] fix/invitatoin accept issue Signed-off-by: sujitaw --- apps/ecosystem/src/ecosystem.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ecosystem/src/ecosystem.service.ts b/apps/ecosystem/src/ecosystem.service.ts index b5c143efa..9aae3d4a0 100755 --- a/apps/ecosystem/src/ecosystem.service.ts +++ b/apps/ecosystem/src/ecosystem.service.ts @@ -484,8 +484,8 @@ export class EcosystemService { throw new BadRequestException(ResponseMessages.ecosystem.error.alreadyAccepted); } const result = await this.ecosystemRepository.updateEcosystemInvitationStatusByEmail( - userEmail, orgId, + userEmail, ecosystemId, status ); From 4d9e021542cb98f0c3f73c1c2bad075291aeba36 Mon Sep 17 00:00:00 2001 From: sujitaw Date: Mon, 9 Mar 2026 11:51:00 +0530 Subject: [PATCH 2/3] wip Signed-off-by: sujitaw --- .../src/ecosystem/ecosystem.controller.ts | 24 +----------------- .../src/platform/platform.controller.ts | 25 +++++++++++++++++-- .../src/platform/platform.service.ts | 6 ++++- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/apps/api-gateway/src/ecosystem/ecosystem.controller.ts b/apps/api-gateway/src/ecosystem/ecosystem.controller.ts index acd6f5281..d50ae0d59 100755 --- a/apps/api-gateway/src/ecosystem/ecosystem.controller.ts +++ b/apps/api-gateway/src/ecosystem/ecosystem.controller.ts @@ -210,7 +210,7 @@ export class EcosystemController { required: true, type: String }) - @Roles(OrgRoles.PLATFORM_ADMIN, OrgRoles.ECOSYSTEM_LEAD) + @Roles(OrgRoles.PLATFORM_ADMIN, OrgRoles.ECOSYSTEM_LEAD, OrgRoles.ECOSYSTEM_MEMBER) async getEcosystems( @User() reqUser: user, @Res() res: Response, @@ -442,28 +442,6 @@ export class EcosystemController { }); } - @Get('/dashboard/summary') - @Roles(OrgRoles.PLATFORM_ADMIN) - @UseGuards(AuthGuard('jwt'), EcosystemRolesGuard) - @ApiBearerAuth() - @ApiOperation({ - summary: 'Get Count for Ecosystem dashboard', - description: 'Get Count for Ecosystem dashboard' - }) - @ApiResponse({ - status: HttpStatus.OK, - description: 'Dashboard count fetched successfully' - }) - async getDashboardCountEcosystem(@Res() res: Response): Promise { - const dashboard = await this.ecosystemService.getDashboardCountEcosystem(); - - return res.status(HttpStatus.OK).json({ - statusCode: HttpStatus.OK, - message: ResponseMessages.ecosystem.success.dashboard, - data: dashboard - }); - } - @Get('/invitation/status') @UseGuards(AuthGuard('jwt')) @ApiBearerAuth() diff --git a/apps/api-gateway/src/platform/platform.controller.ts b/apps/api-gateway/src/platform/platform.controller.ts index 4cc39c3c8..be26c628d 100644 --- a/apps/api-gateway/src/platform/platform.controller.ts +++ b/apps/api-gateway/src/platform/platform.controller.ts @@ -269,7 +269,7 @@ export class PlatformController { description: 'Invitations fetched successfully' }) @Roles(OrgRoles.PLATFORM_ADMIN) - @UseGuards(AuthGuard('jwt'), OrgRolesGuard, EcosystemFeatureGuard) + @UseGuards(AuthGuard('jwt'), OrgRolesGuard) @ApiBearerAuth() async getInvitations( @User() reqUser: user, @@ -324,7 +324,6 @@ export class PlatformController { status: HttpStatus.OK, description: 'Ecosystem status fetched successfully' }) - @Roles(OrgRoles.PLATFORM_ADMIN) @UseGuards(AuthGuard('jwt'), EcosystemRolesGuard) @ApiBearerAuth() async getEcosystemEnableStatus(@Res() res: Response): Promise { @@ -336,4 +335,26 @@ export class PlatformController { data: ecosystemStatus }); } + + @Get('/ecosystem/dashboard/summary') + @Roles(OrgRoles.PLATFORM_ADMIN) + @UseGuards(AuthGuard('jwt'), EcosystemRolesGuard) + @ApiBearerAuth() + @ApiOperation({ + summary: 'Get summary for Ecosystem dashboard', + description: 'Get summary for Ecosystem dashboard' + }) + @ApiResponse({ + status: HttpStatus.OK, + description: 'Dashboard count fetched successfully' + }) + async getDashboardCountEcosystem(@Res() res: Response): Promise { + const dashboard = await this.platformService.getDashboardCountEcosystem(); + + return res.status(HttpStatus.OK).json({ + statusCode: HttpStatus.OK, + message: ResponseMessages.ecosystem.success.dashboard, + data: dashboard + }); + } } diff --git a/apps/api-gateway/src/platform/platform.service.ts b/apps/api-gateway/src/platform/platform.service.ts index a2cbfbb8a..e120e014a 100644 --- a/apps/api-gateway/src/platform/platform.service.ts +++ b/apps/api-gateway/src/platform/platform.service.ts @@ -7,7 +7,7 @@ import { GetAllPlatformCredDefsDto } from '../credential-definition/dto/get-all- import { IPlatformCredDefsData } from '@credebl/common/interfaces/cred-def.interface'; import { NATSClient } from '@credebl/common/NATSClient'; import { ClientProxy } from '@nestjs/microservices'; -import { IEcosystemInvitations } from 'apps/ecosystem/interfaces/ecosystem.interfaces'; +import { IEcosystemInvitations, IPlatformDashboardCount } from 'apps/ecosystem/interfaces/ecosystem.interfaces'; import { IPaginationSortingDto, PaginatedResponse } from '@credebl/common/interfaces/interface'; @Injectable() @@ -86,4 +86,8 @@ export class PlatformService extends BaseService { async getEcosystemEnableStatus(): Promise { return this.natsClient.sendNatsMessage(this.platformServiceProxy, 'get-ecosystem-enable-status', {}); } + + async getDashboardCountEcosystem(): Promise { + return this.natsClient.sendNatsMessage(this.platformServiceProxy, 'get-platform-admin-dashboard-count', {}); + } } From bdd27a83786962e2a3c5080eeaaf7e15d632f7d2 Mon Sep 17 00:00:00 2001 From: sujitaw Date: Tue, 10 Mar 2026 16:05:39 +0530 Subject: [PATCH 3/3] fix/invitaion error for member Signed-off-by: sujitaw --- apps/ecosystem/src/ecosystem.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ecosystem/src/ecosystem.service.ts b/apps/ecosystem/src/ecosystem.service.ts index a13e8786e..6825f44fa 100755 --- a/apps/ecosystem/src/ecosystem.service.ts +++ b/apps/ecosystem/src/ecosystem.service.ts @@ -479,8 +479,8 @@ export class EcosystemService { throw new BadRequestException(ResponseMessages.ecosystem.error.alreadyAccepted); } const result = await this.ecosystemRepository.updateEcosystemInvitationStatusByEmail( - orgId, userEmail, + orgId, ecosystemId, status );