debug(auth): add test route to diagnose routing issue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
groombook-ci[bot]
2026-03-28 15:17:24 +00:00
parent 04549adba5
commit afc13b4a71
+3
View File
@@ -72,6 +72,9 @@ const api = app.basePath("/api");
api.use("*", authMiddleware);
api.use("*", resolveStaffMiddleware);
// Debug: test if api sub-app routing works at all
api.get("/auth-test", (c) => c.json({ test: "route works" }));
// Better-Auth handler — registered on api sub-app so it shares the middleware chain
// authMiddleware and resolveStaffMiddleware both skip /api/auth/ paths
api.on(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], "/auth/**", (c) => {