src/issuer/credentials-metadata/credentials-metadata.controller.ts
:tenantId/credentials-metadata
Methods |
schema |
schema(id: string, tenantId: string)
|
Decorators :
@Get('schema/:id')
|
Retrieves the schema for a specific credential
Returns :
any
|
vct | ||||||||||||
vct(id: string, tenantId: string)
|
||||||||||||
Decorators :
@Get('vct/:id')
|
||||||||||||
Retrieves the VCT (Verifiable Credential Type) from the credentials service.
Parameters :
Returns :
any
|
import { Controller, Get, Param } from "@nestjs/common";
import { ApiExcludeController } from "@nestjs/swagger";
import { CredentialsService } from "../credentials/credentials.service";
@ApiExcludeController(process.env.SWAGGER_ALL !== "true")
@Controller(":tenantId/credentials-metadata")
export class CredentialsMetadataController {
constructor(private readonly credentialsService: CredentialsService) {}
/**
* Retrieves the VCT (Verifiable Credential Type) from the credentials service.
* @param id - The identifier of the credential configuration.
*/
@Get("vct/:id")
vct(@Param("id") id: string, @Param("tenantId") tenantId: string) {
return this.credentialsService.getVCT(id, tenantId);
}
/**
* Retrieves the schema for a specific credential
* @param id
* @returns
*/
@Get("schema/:id")
schema(@Param("id") id: string, @Param("tenantId") tenantId: string) {
return this.credentialsService.getSchema(id, tenantId);
}
}