-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multi-did creation implementation for an organization (#667)
* feat: multi did support Signed-off-by: tipusinghaw <[email protected]> * refactor: added validation Signed-off-by: tipusinghaw <[email protected]> * refactor: added logic for pervious primary DID Signed-off-by: tipusinghaw <[email protected]> * refactor: changed primaryDid and added size to did veriable Signed-off-by: tipusinghaw <[email protected]> * fix: resloved commits Signed-off-by: tipusinghaw <[email protected]> * fix: updated the import url Signed-off-by: tipusinghaw <[email protected]> --------- Signed-off-by: tipusinghaw <[email protected]>
- Loading branch information
1 parent
7508edf
commit 70c5743
Showing
17 changed files
with
462 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
apps/api-gateway/src/organization/dtos/set-primary-did.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ApiExtraModels, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { IsNotEmpty, IsString} from 'class-validator'; | ||
|
||
import { Transform } from 'class-transformer'; | ||
import { trim } from '@credebl/common/cast.helper'; | ||
|
||
@ApiExtraModels() | ||
export class PrimaryDid { | ||
|
||
@ApiPropertyOptional() | ||
@Transform(({ value }) => trim(value)) | ||
@IsNotEmpty({ message: 'Did is required.' }) | ||
@IsString({ message: 'Did must be in string format.' }) | ||
did: string; | ||
|
||
@ApiPropertyOptional() | ||
@Transform(({ value }) => trim(value)) | ||
@IsNotEmpty({ message: 'Id is required.' }) | ||
@IsString({ message: 'Id must be in string format.' }) | ||
id: string; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.