Skip to content

Commit

Permalink
update credentialStatus type
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhraisha committed Oct 11, 2024
1 parent 53ab1c0 commit 5796e2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/credentials/dto/credentialStatus.dto.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export declare class CredentialStatusDTO {
id?: string;
type: string[];
type: string;
statusListIndex: string;
statusPurpose: string;
statusListCredential?: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/credentials/dto/credentialStatus.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ __decorate([
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.Validate)((o) => o['@context'].includes('BitstringStatusListEntry')),
__metadata("design:type", Array)
(0, class_validator_1.Equals)('BitstringStatusListEntry'),
__metadata("design:type", String)
], CredentialStatusDTO.prototype, "type", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)(),
Expand Down
6 changes: 3 additions & 3 deletions src/credentials/dto/credentialStatus.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { IsArray, IsNotEmpty, IsNumberString, IsOptional, IsUrl, Validate } from 'class-validator'
import { Equals, IsArray, IsNotEmpty, IsNumberString, IsOptional, IsUrl } from 'class-validator'

export class CredentialStatusDTO {
@ApiPropertyOptional()
Expand All @@ -9,8 +9,8 @@ export class CredentialStatusDTO {

@ApiProperty()
@IsArray()
@Validate((o) => o['@context'].includes('BitstringStatusListEntry'))
type: string[]
@Equals('BitstringStatusListEntry')
type: string

@ApiPropertyOptional()
@IsNumberString()
Expand Down

0 comments on commit 5796e2d

Please sign in to comment.