fix(api): replace c.req.valid("json") with await c.req.json()

Replace zValidator-orphaned c.req.valid("json") calls with await c.req.json()
in the auth provider bootstrap and test endpoints per CTO review.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
groombook-engineer[bot]
2026-04-03 07:04:00 +00:00
parent 0953d6cb32
commit 032ce584df
+2 -2
View File
@@ -149,7 +149,7 @@ setupRouter.post("/auth-provider", async (c) => {
return c.json({ error: "Auth provider is already configured." }, 409);
}
const body = authProviderBootstrapSchema.parse(c.req.valid("json"));
const body = authProviderBootstrapSchema.parse(await c.req.json());
// Encrypt clientSecret before storing
const encryptedSecret = encryptSecret(body.clientSecret);
@@ -206,7 +206,7 @@ setupRouter.post("/auth-provider/test", async (c) => {
return c.json({ ok: false, error: "Setup has already been completed." }, 403);
}
const body = authProviderTestSchema.parse(c.req.valid("json"));
const body = authProviderTestSchema.parse(await c.req.json());
// Determine the discovery URL
const discoveryUrl = body.internalBaseUrl