use strict zod objects and hide proto on targets

This commit is contained in:
Milo Schwartz 2024-11-14 00:00:17 -05:00
parent 44b932937f
commit ba3505a385
No known key found for this signature in database
14 changed files with 154 additions and 162 deletions

View file

@ -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",
});