mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 21:36:37 +00:00
used zod codemod
This commit is contained in:
@@ -10,14 +10,12 @@ import logger from "@server/logger";
|
||||
import { fromError } from "zod-validation-error";
|
||||
import { OpenAPITags, registry } from "@server/openApi";
|
||||
|
||||
const listResourceUsersSchema = z
|
||||
.object({
|
||||
const listResourceUsersSchema = z.strictObject({
|
||||
resourceId: z
|
||||
.string()
|
||||
.transform(Number)
|
||||
.pipe(z.number().int().positive())
|
||||
})
|
||||
.strict();
|
||||
.pipe(z.int().positive())
|
||||
});
|
||||
|
||||
async function queryUsers(resourceId: number) {
|
||||
return await db
|
||||
|
||||
Reference in New Issue
Block a user