diff --git a/apps/holder-backend/src/app/credentials/credentials.controller.ts b/apps/holder-backend/src/app/credentials/credentials.controller.ts index 7e0d784d..a65f8d56 100644 --- a/apps/holder-backend/src/app/credentials/credentials.controller.ts +++ b/apps/holder-backend/src/app/credentials/credentials.controller.ts @@ -1,24 +1,15 @@ import { - Body, ConflictException, Controller, Delete, Get, Param, - Post, Query, UseGuards, } from '@nestjs/common'; -import { - ApiBody, - ApiOAuth2, - ApiOperation, - ApiQuery, - ApiTags, -} from '@nestjs/swagger'; +import { ApiOAuth2, ApiOperation, ApiQuery, ApiTags } from '@nestjs/swagger'; import { AuthGuard, AuthenticatedUser } from 'nest-keycloak-connect'; import { CredentialsService } from './credentials.service'; -import { CreateCredentialDto } from './dto/create-credential.dto'; import { CredentialResponse } from './dto/credential-response.dto'; import { KeycloakUser } from '../auth/user'; @@ -29,16 +20,6 @@ import { KeycloakUser } from '../auth/user'; export class CredentialsController { constructor(private readonly credentialsService: CredentialsService) {} - @ApiOperation({ summary: 'store a credential' }) - @ApiBody({ type: CreateCredentialDto }) - @Post() - create( - @Body() createCredentialDto: CreateCredentialDto, - @AuthenticatedUser() user: KeycloakUser - ) { - return this.credentialsService.create(createCredentialDto, user.sub); - } - @ApiOperation({ summary: 'get all credentials' }) @ApiQuery({ name: 'archive', required: false, type: Boolean }) @Get() diff --git a/apps/holder-backend/src/app/credentials/dto/create-credential.dto.ts b/apps/holder-backend/src/app/credentials/dto/create-credential.dto.ts deleted file mode 100644 index 4f331f5c..00000000 --- a/apps/holder-backend/src/app/credentials/dto/create-credential.dto.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - CredentialConfigurationSupported, - MetadataDisplay, -} from '@sphereon/oid4vci-common'; -import { IsObject, IsString } from 'class-validator'; - -export class CreateCredentialDto { - /** - * The id of the credential - */ - @IsString() - id: string; - - /** - * JSON based credential - */ - @IsString() - value: string; - - /** - * Metadata of the credential - */ - @IsObject() - metaData: CredentialConfigurationSupported; - - @IsObject() - issuer: MetadataDisplay; -}