mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
fix z.coerce.number
This commit is contained in:
@@ -25,7 +25,7 @@ import { DeleteLoginPageResponse } from "@server/routers/loginPage/types";
|
||||
const paramsSchema = z
|
||||
.object({
|
||||
orgId: z.string(),
|
||||
loginPageId: z.coerce.number()
|
||||
loginPageId: z.coerce.number<number>()
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ import { fromError } from "zod-validation-error";
|
||||
import { LoadLoginPageResponse } from "@server/routers/loginPage/types";
|
||||
|
||||
const querySchema = z.object({
|
||||
resourceId: z.coerce.number().int().positive().optional(),
|
||||
idpId: z.coerce.number().int().positive().optional(),
|
||||
resourceId: z.coerce.number<number>().int().positive().optional(),
|
||||
idpId: z.coerce.number<number>().int().positive().optional(),
|
||||
orgId: z.string().min(1).optional(),
|
||||
fullDomain: z.string().min(1)
|
||||
});
|
||||
|
||||
@@ -31,7 +31,7 @@ import { UpdateLoginPageResponse } from "@server/routers/loginPage/types";
|
||||
const paramsSchema = z
|
||||
.object({
|
||||
orgId: z.string(),
|
||||
loginPageId: z.coerce.number()
|
||||
loginPageId: z.coerce.number<number>()
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { OpenAPITags, registry } from "@server/openApi";
|
||||
const paramsSchema = z
|
||||
.object({
|
||||
orgId: z.string().optional(), // Optional; used with org idp in saas
|
||||
idpId: z.coerce.number()
|
||||
idpId: z.coerce.number<number>()
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import { GetOrgIdpResponse } from "@server/routers/orgIdp/types";
|
||||
const paramsSchema = z
|
||||
.object({
|
||||
orgId: z.string().nonempty(),
|
||||
idpId: z.coerce.number()
|
||||
idpId: z.coerce.number<number>()
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import { TierId } from "@server/lib/billing/tiers";
|
||||
const paramsSchema = z
|
||||
.object({
|
||||
orgId: z.string().nonempty(),
|
||||
idpId: z.coerce.number()
|
||||
idpId: z.coerce.number<number>()
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user