Skip to content

Commit 02a2eff

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

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export class RequestProofDtoBase extends ProofPayload {
272272
autoAcceptProof: AutoAccept;
273273
version: string;
274274
}
275-
export class RequestProofDto extends RequestProofDtoBase {
275+
export class RequestProofDtoV1 extends RequestProofDtoBase {
276276
@ApiProperty({
277277
example: '32f54163-7166-48f1-93d8-ff217bdb0653'
278278
})
@@ -283,7 +283,7 @@ export class RequestProofDto extends RequestProofDtoBase {
283283
}
284284

285285

286-
export class ProofRequestPayloadDto extends RequestProofDtoBase {
286+
export class RequestProofDtoV2 extends RequestProofDtoBase {
287287
@ApiProperty({
288288
example: ['32f54163-7166-48f1-93d8-ff217bdb0653']
289289
})

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Controller, Logger, Post, Body, Get, Query, HttpStatus, Res, UseGuards,
1616
import { ApiResponseDto } from '../dtos/apiResponse.dto';
1717
import { UnauthorizedErrorDto } from '../dtos/unauthorized-error.dto';
1818
import { ForbiddenErrorDto } from '../dtos/forbidden-error.dto';
19-
import { SendProofRequestPayload, RequestProofDto, ProofRequestPayloadDto } from './dto/request-proof.dto';
19+
import { SendProofRequestPayload, RequestProofDtoV1, RequestProofDtoV2 } from './dto/request-proof.dto';
2020
import { VerificationService } from './verification.service';
2121
import IResponseType, { IResponse } from '@credebl/common/interfaces/response.interface';
2222
import { Response } from 'express';
@@ -171,7 +171,7 @@ export class VerificationController {
171171
@ApiResponse({ status: HttpStatus.OK, description: 'Success', type: ApiResponseDto })
172172
@ApiUnauthorizedResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Unauthorized', type: UnauthorizedErrorDto })
173173
@ApiForbiddenResponse({ status: HttpStatus.FORBIDDEN, description: 'Forbidden', type: ForbiddenErrorDto })
174-
@ApiBody({ type: RequestProofDto })@ApiQuery({
174+
@ApiBody({ type: RequestProofDtoV1 })@ApiQuery({
175175
name: 'requestType',
176176
enum: ProofRequestType
177177
})
@@ -182,7 +182,7 @@ export class VerificationController {
182182
@Res() res: Response,
183183
@User() user: IUserRequest,
184184
@Param('orgId', new ParseUUIDPipe({exceptionFactory: (): Error => { throw new BadRequestException(`Invalid format for orgId`); }})) orgId: string,
185-
@Body() requestProof: RequestProofDto,
185+
@Body() requestProof: RequestProofDtoV1,
186186
@Query('requestType') requestType:ProofRequestType = ProofRequestType.INDY
187187
): Promise<Response> {
188188

@@ -233,7 +233,7 @@ export class VerificationController {
233233
@ApiResponse({ status: HttpStatus.OK, description: 'Success', type: ApiResponseDto })
234234
@ApiUnauthorizedResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Unauthorized', type: UnauthorizedErrorDto })
235235
@ApiForbiddenResponse({ status: HttpStatus.FORBIDDEN, description: 'Forbidden', type: ForbiddenErrorDto })
236-
@ApiBody({ type: ProofRequestPayloadDto })@ApiQuery({
236+
@ApiBody({ type: RequestProofDtoV2 })@ApiQuery({
237237
name: 'requestType',
238238
enum: ProofRequestType
239239
})
@@ -244,7 +244,7 @@ export class VerificationController {
244244
@Res() res: Response,
245245
@User() user: IUserRequest,
246246
@Param('orgId', new ParseUUIDPipe({exceptionFactory: (): Error => { throw new BadRequestException(`Invalid format for orgId`); }})) orgId: string,
247-
@Body() requestProof: ProofRequestPayloadDto,
247+
@Body() requestProof: RequestProofDtoV2,
248248
@Query('requestType') requestTypeV1:ProofRequestType = ProofRequestType.INDY
249249
): Promise<Response> {
250250

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable, Inject} from '@nestjs/common';
22
import { ClientProxy} from '@nestjs/microservices';
33
import { BaseService } from 'libs/service/base.service';
4-
import { SendProofRequestPayload, RequestProofDto, ProofRequestPayloadDto } from './dto/request-proof.dto';
4+
import { SendProofRequestPayload, RequestProofDtoV1, RequestProofDtoV2 } from './dto/request-proof.dto';
55
import { IUserRequest } from '@credebl/user-request/user-request.interface';
66
import { WebhookPresentationProofDto } from './dto/webhook-proof.dto';
77
import { IProofPresentationDetails, IProofPresentationList, IVerificationRecords } from '@credebl/common/interfaces/verification.interface';
@@ -47,7 +47,7 @@ export class VerificationService extends BaseService {
4747
* @param orgId
4848
* @returns Requested proof presentation details
4949
*/
50-
sendProofRequest(requestProofDto: RequestProofDto | ProofRequestPayloadDto, user: IUserRequest): Promise<IProofRequest> {
50+
sendProofRequest(requestProofDto: RequestProofDtoV1 | RequestProofDtoV2, user: IUserRequest): Promise<IProofRequest> {
5151
const payload = { requestProofDto, user };
5252
return this.natsClient.sendNatsMessage(this.verificationServiceProxy, 'send-proof-request', payload);
5353
}

0 commit comments

Comments
 (0)