used zod codemod

This commit is contained in:
Lokowitz
2025-11-16 14:18:17 +00:00
parent 000904eb31
commit 7db99a7dd5
191 changed files with 764 additions and 1232 deletions

View File

@@ -10,20 +10,16 @@ import { fromError } from "zod-validation-error";
import { eq } from "drizzle-orm";
import { OpenAPITags, registry } from "@server/openApi";
const setUserResourcesBodySchema = z
.object({
const setUserResourcesBodySchema = z.strictObject({
userIds: z.array(z.string())
})
.strict();
});
const setUserResourcesParamsSchema = z
.object({
const setUserResourcesParamsSchema = z.strictObject({
resourceId: z
.string()
.transform(Number)
.pipe(z.number().int().positive())
})
.strict();
.pipe(z.int().positive())
});
registry.registerPath({
method: "post",