@@ -49,7 +49,6 @@ import { OrgRolesGuard } from '../authz/guards/org-roles.guard';
49
49
import { OrgRoles } from 'libs/org-roles/enums' ;
50
50
import { AwsService } from '@credebl/aws/aws.service' ;
51
51
import { PaginationDto } from '@credebl/common/dtos/pagination.dto' ;
52
- import { CreateCertificateDto } from './dto/share-certificate.dto' ;
53
52
import { UserAccessGuard } from '../authz/guards/user-access-guard' ;
54
53
55
54
@UseFilters ( CustomExceptionFilter )
@@ -266,23 +265,6 @@ export class UserController {
266
265
267
266
return res . status ( HttpStatus . OK ) . json ( finalResponse ) ;
268
267
}
269
- /**
270
- * @param credentialId
271
- * @returns User credentials
272
- */
273
- @Get ( '/user-credentials/:credentialId' )
274
- @ApiOperation ( { summary : 'Get user credentials by Id' , description : 'Get user credentials by Id' } )
275
- @ApiResponse ( { status : HttpStatus . OK , description : 'Success' , type : ApiResponseDto } )
276
- async getUserCredentialsById ( @Param ( 'credentialId' ) credentialId : string , @Res ( ) res : Response ) : Promise < Response > {
277
- const getUserCrdentialsById = await this . userService . getUserCredentialsById ( credentialId ) ;
278
-
279
- const finalResponse : IResponse = {
280
- statusCode : HttpStatus . OK ,
281
- message : ResponseMessages . user . success . userCredentials ,
282
- data : getUserCrdentialsById
283
- } ;
284
- return res . status ( HttpStatus . OK ) . json ( finalResponse ) ;
285
- }
286
268
287
269
/**
288
270
*
@@ -311,34 +293,7 @@ export class UserController {
311
293
} ;
312
294
return res . status ( HttpStatus . CREATED ) . json ( finalResponse ) ;
313
295
}
314
- /**
315
- * @Body shareUserCredentials
316
- * @returns User certificate URL
317
- */
318
- @Post ( '/certificate' )
319
- @ApiOperation ( {
320
- summary : 'Share user certificate' ,
321
- description : 'Share user certificate'
322
- } )
323
- @ApiResponse ( { status : HttpStatus . OK , description : 'Success' , type : ApiResponseDto } )
324
- async shareUserCertificate (
325
- @Body ( ) shareUserCredentials : CreateCertificateDto ,
326
- @Res ( ) res : Response
327
- ) : Promise < Response > {
328
- const schemaIdParts = shareUserCredentials . schemaId . split ( ':' ) ;
329
- // eslint-disable-next-line prefer-destructuring
330
- const title = schemaIdParts [ 2 ] ;
331
-
332
- const imageBuffer = await this . userService . shareUserCertificate ( shareUserCredentials ) ;
333
- const finalResponse : IResponse = {
334
- statusCode : HttpStatus . CREATED ,
335
- message : ResponseMessages . user . success . shareUserCertificate || ResponseMessages . user . success . degreeCertificate ,
336
- label : title ,
337
- data : imageBuffer
338
- } ;
339
- return res . status ( HttpStatus . CREATED ) . json ( finalResponse ) ;
340
- }
341
-
296
+
342
297
/**
343
298
* @Body updateUserProfileDto
344
299
* @returns User details
0 commit comments