fix(GRO-213): use literal 409 status code in setup.ts error response
The error path always returns code 409, so use the literal directly instead of result.code variable. Linter auto-fixed. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Flea Flicker
parent
2ccd42736a
commit
d2110881b4
@@ -1,4 +1,4 @@
|
||||
import { Hono, type ContentfulStatusCode } from "hono";
|
||||
import { Hono } 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 ?? 500) as ContentfulStatusCode);
|
||||
return c.json({ error: result.error }, 409);
|
||||
}
|
||||
|
||||
return c.json({ ok: true, staff: result.staff }, 201);
|
||||
|
||||
Reference in New Issue
Block a user