API v2 accounts and check-in (1.51.2)

- v2: auth/signup, auth/login (+ code step, rate limited), PATCH /me; check-in look-up and
  scan returning an outcome for every normal result. Campus rule as v1.
- Sign up/login/2FA/profile moved to src/services/auth.ts; scan preview and scan to
  src/services/checkin.ts. v1 answers unchanged (ServiceError v1Status).
- Login, 2FA step, sign up and profile/password pages use v2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 09:31:00 +02:00
co-authored by Claude Opus 5.5
parent 440c43e530
commit 6816e8bc67
28 changed files with 3006 additions and 781 deletions
+3 -1
View File
@@ -48,6 +48,8 @@ export type RouteDef<P extends Schema | undefined, Q extends Schema | undefined,
response: R;
/** HTTP status on success (default 200). */
status?: number;
/** Runs after the access check, e.g. a rate limiter. */
middleware?: RequestHandler[];
handler: (ctx: Ctx<Infer<P>, Infer<Q>, Infer<B>>) => Promise<z.input<R>> | z.input<R>;
};
@@ -100,6 +102,6 @@ export function mount(router: Router, list: AnyRoute[] = routes): void {
next(err);
}
};
router[def.method](def.path, ...ACCESS[def.access], run);
router[def.method](def.path, ...ACCESS[def.access], ...(def.middleware ?? []), run);
}
}