fix(portal): implement Customer Portal reschedule button and modal #144

Merged
groombook-engineer[bot] merged 14 commits from feature/gro-118-better-auth into main 2026-03-28 22:10:50 +00:00
Showing only changes of commit 858cde6260 - Show all commits
+4 -7
View File
@@ -72,14 +72,11 @@ 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
// Better-Auth handler — mounted as sub-app to handle all /api/auth/* routes
// authMiddleware and resolveStaffMiddleware both skip /api/auth/ paths
api.on(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], "/auth/**", (c) => {
return auth.handler(c.req.raw);
});
const authRouter = new Hono();
authRouter.all("/*", (c) => auth.handler(c.req.raw));
api.route("/auth", authRouter);
// ── Role guards ────────────────────────────────────────────────────────────────
// Manager-only: admin settings, reports, invoices, impersonation