feat(portal): replace mock data with real session-driven API calls #152

Merged
groombook-engineer[bot] merged 25 commits from feat/gro-203-rbac-super-user into main 2026-03-29 07:08:35 +00:00
Showing only changes of commit 2ccd42736a - Show all commits
+2 -2
View File
@@ -1,4 +1,4 @@
import { Hono } from "hono";
import { Hono, type ContentfulStatusCode } from "hono";
import { zValidator } from "@hono/zod-validator";
import { z } from "zod/v3";
import { eq, getDb, staff, businessSettings } from "@groombook/db";
@@ -70,7 +70,7 @@ setupRouter.post("/", zValidator("json", setupSchema), async (c) => {
});
if ("error" in result) {
return c.json({ error: result.error }, result.code as number);
return c.json({ error: result.error }, (result.code ?? 500) as ContentfulStatusCode);
}
return c.json({ ok: true, staff: result.staff }, 201);