mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-27 07:16:40 +00:00
use strict zod objects and hide proto on targets
This commit is contained in:
@@ -25,10 +25,12 @@ const createResourceParamsSchema = z.object({
|
||||
orgId: z.string(),
|
||||
});
|
||||
|
||||
const createResourceSchema = z.object({
|
||||
name: z.string().min(1).max(255),
|
||||
subdomain: z.string().min(1).max(255).optional(),
|
||||
});
|
||||
const createResourceSchema = z
|
||||
.object({
|
||||
name: z.string().min(1).max(255),
|
||||
subdomain: z.string().min(1).max(255).optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type CreateResourceResponse = Resource;
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@ const updateResourceBodySchema = z
|
||||
name: z.string().min(1).max(255).optional(),
|
||||
subdomain: z.string().min(1).max(255).optional(),
|
||||
ssl: z.boolean().optional(),
|
||||
siteId: z.number(),
|
||||
// siteId: z.number(),
|
||||
})
|
||||
.strict()
|
||||
.refine((data) => Object.keys(data).length > 0, {
|
||||
message: "At least one field must be provided for update",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user