diff --git a/.DS_Store b/.DS_Store index 8bf6fad..4b0b844 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index bafb6d2..9c86ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -168,3 +168,5 @@ build .DS_Store # End of https://www.toptal.com/developers/gitignore/api/node,visualstudiocode + +compose-test.yaml \ No newline at end of file diff --git a/src/endpoints/getCredentialLinks.ts b/src/endpoints/getCredentialLinks.ts index 98032a1..33e1d5a 100644 --- a/src/endpoints/getCredentialLinks.ts +++ b/src/endpoints/getCredentialLinks.ts @@ -49,7 +49,7 @@ export const getCredentialLinks: PayloadHandler = async (req, res) => { ) as any as UnsignedVC; // Prep for sending to signing service - builtCredential.id = id; + builtCredential.id = `urn:uuid:${id}`; if (typeof builtCredential?.issuer === 'string') builtCredential.issuer = {}; if ('id' in (builtCredential?.issuer ?? {})) delete builtCredential.issuer.id; diff --git a/src/endpoints/revokeCredential.ts b/src/endpoints/revokeCredential.ts index 6aac6b6..5d35b0a 100644 --- a/src/endpoints/revokeCredential.ts +++ b/src/endpoints/revokeCredential.ts @@ -10,13 +10,13 @@ export const revokeCredential: PayloadHandler = async (req, res) => { const { id } = req.params; const { reason } = req.body; - + const credentialId = `urn:uuid:${id}` try { - const fetchResponse = await fetch(`${coordinatorUrl}/instance/:tenantName/credentials/status`, { + const fetchResponse = await fetch(`${coordinatorUrl}/instance/${tenantName}/credentials/status`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ - credentialId: id, + credentialId, credentialStatus: [{ type: 'BitstringStatusListCredential', status: 'revoked' }], }), });