Add a verification interface for review
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user