diff --git a/docs/api/Committee-Guide.md b/docs/api/Committee-Guide.md index c142ba2..73d2fdb 100644 --- a/docs/api/Committee-Guide.md +++ b/docs/api/Committee-Guide.md @@ -25,7 +25,36 @@ This file contains the necessary steps for the committee to: ### Onboarding a new member -#### Onboarding the member into the Public Directory +#### Onboarding a Type-1 member into the Public Directory + +##### requirements +* You must have: + 1. The DID (Decentralized Identifier) + 2. New Member's Metadata + +```sh +api_url=http://localhost:3002 # Set LACChain Trust url +``` + +```sh +validDays=500 +expires=true +# metadata +did="did:lac1:1iT5Bd7Df76GVtsWfHEQpCE6461Coy1e9ijvWHMAxoVaBm7vpXTJWyPZzoeMsnUyth5V" +legalName="Acme Corp" +domainName="example.com" # optional +identificationData='{"id":'\"$did\"',"legalName":'\"$legalName\"',"domainName": '\"$domainName\"'}' + +# process +add_type1_member_to_public_directory_url="$api_url"/api/v1/public-directory/add-type1-member +data='{"validDays":'$validDays', "expires":'$expires',"identificationData":'$identificationData'}' +curl -X 'POST' ${add_type1_member_to_public_directory_url} -H 'accept: application/json' \ +-H 'Content-Type: application/json' \ +-d "$data" +``` + + +#### Onboarding a Type-2 member into the Public Directory ##### requirements * You must have: @@ -54,7 +83,7 @@ data='{"validDays":'$validDays', "expires":'$expires',"identificationData":'$ide curl -X 'POST' ${add_member_to_public_directory_url} -H 'accept: application/json' -F caCert=@$path_to_public_cacrt -F data=$data ``` -#### Onboarding the member into the Chain of Trust +#### Onboarding a member into the Chain of Trust ```sh diff --git a/src/controllers/lac1/public.directory.controller.ts b/src/controllers/lac1/public.directory.controller.ts index 84df264..4eed0af 100644 --- a/src/controllers/lac1/public.directory.controller.ts +++ b/src/controllers/lac1/public.directory.controller.ts @@ -56,7 +56,7 @@ export class PublicDirectoryController { * @param {Express.Multer.File} caCert - Certificate Authority file */ @Post('/add-type2-member') - async addMember( + async addType2Member( @Body({ validate: true }) data: any, @UploadedFile('caCert') caCert: Express.Multer.File ): Promise {