mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
used zod codemod
This commit is contained in:
@@ -9,17 +9,13 @@ import logger from "@server/logger";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { fromError } from "zod-validation-error";
|
||||
|
||||
const addRoleActionParamSchema = z
|
||||
.object({
|
||||
roleId: z.string().transform(Number).pipe(z.number().int().positive())
|
||||
})
|
||||
.strict();
|
||||
const addRoleActionParamSchema = z.strictObject({
|
||||
roleId: z.string().transform(Number).pipe(z.int().positive())
|
||||
});
|
||||
|
||||
const addRoleActionSchema = z
|
||||
.object({
|
||||
const addRoleActionSchema = z.strictObject({
|
||||
actionId: z.string()
|
||||
})
|
||||
.strict();
|
||||
});
|
||||
|
||||
export async function addRoleAction(
|
||||
req: Request,
|
||||
|
||||
Reference in New Issue
Block a user