From afc13b4a714a2587434d240f18b4345a639b3b77 Mon Sep 17 00:00:00 2001 From: "groombook-ci[bot]" Date: Sat, 28 Mar 2026 15:17:24 +0000 Subject: [PATCH] debug(auth): add test route to diagnose routing issue Co-Authored-By: Claude Opus 4.6 --- apps/api/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index dfbe3e5..7bedaef 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -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) => {