Skip to content

Commit

Permalink
fix: Typing
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Lanser <[email protected]>
  • Loading branch information
Tommylans committed Nov 26, 2024
1 parent ca099a8 commit 0f8bb4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
34 changes: 16 additions & 18 deletions agent/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,22 @@ apiRouter.post('/offers/receive', async (request: Request, response: Response) =

apiRouter.get('/verifier', async (_, response: Response) => {
return response.json({
presentationRequests: verifiers
.filter((v) => 'useCase' in v)
.flatMap((verifier) => [
...verifier.presentationRequests.map((c) => {
return {
useCase: verifier.useCase,
display: `${verifier.clientMetadata.client_name} - ${c.name} - DIF PEX`,
id: c.id,
}
}),
...verifier.dcqlRequests.map((c) => {
return {
useCase: verifier.useCase,
display: `${verifier.clientMetadata.client_name} - ${c.name} - DCQL`,
id: c.id,
}
}),
]),
presentationRequests: verifiers.flatMap((verifier) => [
...verifier.presentationRequests.map((c) => {
return {
useCase: 'useCase' in verifier ? verifier.useCase : undefined,
display: `${verifier.clientMetadata.client_name} - ${c.name} - DIF PEX`,
id: c.id,
}
}),
...verifier.dcqlRequests.map((c) => {
return {
useCase: 'useCase' in verifier ? verifier.useCase : undefined,
display: `${verifier.clientMetadata.client_name} - ${c.name} - DCQL`,
id: c.id,
}
}),
]),
})
})

Expand Down
2 changes: 1 addition & 1 deletion agent/src/verifiers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const verifiers = [
farmatecVerifier,
pgeuVerifier,
europeanUnionVerifier,
] as const
]
export const allDefinitions = verifiers.flatMap(
(
v
Expand Down

0 comments on commit 0f8bb4d

Please sign in to comment.