Skip to content

Commit

Permalink
fix: add CreateRevocationRegistryDto
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking committed Dec 18, 2024
1 parent 93db6a3 commit d661c9e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/chatbot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ const server = app.listen(PORT, async () => {
const credentialDefinition = (await apiClient.credentialTypes.import(phoneCredDefData))
phoneNumberCredentialDefinitionId =
phoneNumberCredentialType?.id ?? credentialDefinition.id
phoneNumberRevocationDefinitionId =
phoneNumberCredentialType?.revocationId ? phoneNumberCredentialType?.revocationId?.[0] : credentialDefinition.revocationId?.[0]
logger.info(`phoneNumberCredentialDefinitionId: ${phoneNumberCredentialDefinitionId}`)
logger.info(`phoneNumberRevocationDefinitionId: ${credentialDefinition.revocationId}`)
phoneNumberRevocationDefinitionId =
phoneNumberCredentialType?.revocationIds ?
phoneNumberCredentialType?.revocationIds?.[0] :
await apiClient.credentialTypes.createRevocation(phoneNumberCredentialDefinitionId)
logger.info(`phoneNumberRevocationDefinitionId: ${phoneNumberRevocationDefinitionId}`)
} catch (error) {
logger.error(`Could not create or retrieve phone number credential type: ${error}`)
}
Expand Down

0 comments on commit d661c9e

Please sign in to comment.