Skip to content

Commit 37934df

Browse files
fix: comments on pull request
Signed-off-by: pranalidhanavade <[email protected]>
1 parent 99d8377 commit 37934df

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.env.demo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ AFJ_AGENT_ENDPOINT_PATH=/agent-provisioning/AFJ/endpoints/
126126

127127
AGENT_PROTOCOL=http
128128
OOB_BATCH_SIZE=10
129-
MAX_CONNECTIONS_LIMIT=10
129+
PROOF_REQ_CONN_LIMIT=10
130130
MAX_ORG_LIMIT=10
131131
FIDO_API_ENDPOINT=http://localhost:8000
132132

.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ PLATFORM_ID=
9898
PLATFORM_PROFILE_MODE= // Please provide your environment name
9999

100100
OOB_BATCH_SIZE=10
101-
MAX_CONNECTIONS_LIMIT=10
101+
PROOF_REQ_CONN_LIMIT=10
102102

103103
AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/
104104
DATABASE_URL="postgresql://postgres:xxxxxx@localhost:5432/postgres?schema=public" #Provide supabase postgres URL and Use the correct user/pwd, IP Address

apps/api-gateway/src/main.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as dotenv from 'dotenv';
22
import * as express from 'express';
33

44
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
5-
import { Logger, ValidationPipe, VersioningType } from '@nestjs/common';
5+
import { Logger, ValidationPipe, VERSION_NEUTRAL, VersioningType } from '@nestjs/common';
66

77
import { AppModule } from './app.module';
88
import { HttpAdapterHost, NestFactory } from '@nestjs/core';
@@ -58,7 +58,8 @@ async function bootstrap(): Promise<void> {
5858
.build();
5959

6060
app.enableVersioning({
61-
type: VersioningType.URI
61+
type: VersioningType.URI,
62+
defaultVersion: ['1']
6263
});
6364

6465
const document = SwaggerModule.createDocument(app, options);
@@ -74,6 +75,11 @@ async function bootstrap(): Promise<void> {
7475
});
7576
}
7677

78+
app.enableVersioning({
79+
type: VersioningType.URI,
80+
defaultVersion: ['1', VERSION_NEUTRAL]
81+
});
82+
7783
app.use(express.static('uploadedFiles/holder-profile'));
7884
app.use(express.static('uploadedFiles/org-logo'));
7985
app.use(express.static('uploadedFiles/tenant-logo'));

apps/api-gateway/src/verification/dto/request-proof.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class ProofRequestPayloadDto extends RequestProofDtoBase {
290290
@IsNotEmpty({ each: true, message: 'connectionId array elements must not be empty' })
291291
@IsArray({ message: 'connectionId must be an array' })
292292
@ArrayMinSize(1, { message: 'connectionId must contain at least 1 element' })
293-
@ArrayMaxSize(Number(process.env.MAX_CONNECTIONS_LIMIT), { message: `Limit reached (${process.env.MAX_CONNECTIONS_LIMIT} connections max).` })
293+
@ArrayMaxSize(Number(process.env.PROOF_REQ_CONN_LIMIT), { message: `Limit reached (${process.env.PROOF_REQ_CONN_LIMIT} connections max).` })
294294
@IsUUID('all', { each: true, message: 'Each connectionId must be a valid UUID' })
295295
connectionId: string[];
296296
}

apps/api-gateway/src/verification/verification.controller.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ApiQuery,
1313
ApiExcludeEndpoint
1414
} from '@nestjs/swagger';
15-
import { Controller, Logger, Post, Body, Get, Query, HttpStatus, Res, UseGuards, Param, UseFilters, BadRequestException, ParseUUIDPipe, Delete, Version, VERSION_NEUTRAL } from '@nestjs/common';
15+
import { Controller, Logger, Post, Body, Get, Query, HttpStatus, Res, UseGuards, Param, UseFilters, BadRequestException, ParseUUIDPipe, Delete, Version } from '@nestjs/common';
1616
import { ApiResponseDto } from '../dtos/apiResponse.dto';
1717
import { UnauthorizedErrorDto } from '../dtos/unauthorized-error.dto';
1818
import { ForbiddenErrorDto } from '../dtos/forbidden-error.dto';
@@ -163,7 +163,6 @@ export class VerificationController {
163163
* @param orgId
164164
* @returns Requested proof presentation details
165165
*/
166-
@Version(VERSION_NEUTRAL)
167166
@Post('/orgs/:orgId/proofs')
168167
@ApiOperation({
169168
summary: `Sends a proof request`,
@@ -225,11 +224,11 @@ export class VerificationController {
225224
* @param orgId
226225
* @returns Requested proof presentation details
227226
*/
228-
@Version('1')
227+
@Version('2')
229228
@Post('/orgs/:orgId/proofs')
230229
@ApiOperation({
231230
summary: `Sends a proof request`,
232-
description: `Sends a proof request`
231+
description: `Send a proof request on multiple connections`
233232
})
234233
@ApiResponse({ status: HttpStatus.OK, description: 'Success', type: ApiResponseDto })
235234
@ApiUnauthorizedResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Unauthorized', type: UnauthorizedErrorDto })

0 commit comments

Comments
 (0)