Add a verification interface for review

This commit is contained in:
Dominic Ferrando
2026-09-19 17:57:52 -04:00
parent f593aabd25
commit dc7ebd6873
6 changed files with 772 additions and 4 deletions
+8
View File
@@ -555,6 +555,13 @@ export const app = new Elysia()
offset: t.Optional(t.Numeric()),
})
})
.get("/:id", async ({ params: { id } }) => {
const verification = await s.Verifications.get(id);
if (!verification) throw new NotFoundError("Verification not found");
return verification;
}, {
params: t.Object({ id: t.String() })
})
.post("/:id/request-action", async ({ params: { id }, body: { reviewerNotes, activityVerifications } }) => {
const updated = await s.Verifications.requestAction(id, reviewerNotes ?? null, activityVerifications);
if (!updated) throw new NotFoundError("Verification not found");
@@ -684,3 +691,4 @@ app.listen(3000, async () => {
export type API = typeof app
export { type EventStatus } from "./services/events";
export { type VerificationStatus } from "./services/verifications";