Skip to content

Commit

Permalink
Revert removal of /user/userId endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrgn committed Jan 30, 2025
1 parent f2423fe commit e2ab20c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/routers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,21 @@ export const shlApiRouter = new oak.Router()
return;
}
})
.get('/user/:userId', async (context: oak.Context) => {
const shl = db.DbLinks.getUserShl(context.params.userId)!;
if (!shl) {
log(context, {
action: "read",
severity: "warning",
entity: { detail: { action: `Get shl for user '${context.params.userId}'` } },
}, {userId: context.params.userId} as types.HealthLink);
return;
}
log(context, {
action: "read"
}, shl);
return (context.response.body = shl);
})
.get('/shl/:shlId/file/:fileIndex', (context) => {
const ticket = manifestAccessTickets.get(context.request.url.searchParams.get('ticket')!);
if (!ticket) {
Expand Down

0 comments on commit e2ab20c

Please sign in to comment.