mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-14 17:06:39 +00:00
used zod codemod
This commit is contained in:
@@ -9,15 +9,13 @@ import createHttpError from "http-errors";
|
||||
import logger from "@server/logger";
|
||||
import { fromError } from "zod-validation-error";
|
||||
|
||||
const removeUserResourceSchema = z
|
||||
.object({
|
||||
const removeUserResourceSchema = z.strictObject({
|
||||
userId: z.string(),
|
||||
resourceId: z
|
||||
.string()
|
||||
.transform(Number)
|
||||
.pipe(z.number().int().positive())
|
||||
})
|
||||
.strict();
|
||||
.pipe(z.int().positive())
|
||||
});
|
||||
|
||||
export async function removeUserResource(
|
||||
req: Request,
|
||||
|
||||
Reference in New Issue
Block a user