Skip to content

Commit d2fc2d8

Browse files
committed
chore: add isRevoked field
1 parent 82234c8 commit d2fc2d8

File tree

1 file changed

+6
-1
lines changed
  • apps/issuer-service/src/routes/credentials

1 file changed

+6
-1
lines changed

apps/issuer-service/src/routes/credentials/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ const credentials: FastifyPluginAsyncJsonSchemaToTs = async (
2222

2323
// Decode JWTs
2424
const credentials = credentialJWTs.map((credentialJWT) => {
25-
return decodeJWT(credentialJWT).payload;
25+
const credential = decodeJWT(credentialJWT).payload;
26+
27+
return {
28+
credential,
29+
isRevoked: fastify.revocationCache.get(credential.id) !== undefined,
30+
};
2631
});
2732

2833
return reply.code(200).send(credentials);

0 commit comments

Comments
 (0)