summaryrefslogtreecommitdiff
path: root/src/schemas.ts
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-11 05:51:13 -0500
committerseth <[email protected]>2023-11-11 05:54:16 -0500
commit70edf4c616e59a8e83e7ca7faf9faefd6e0b817c (patch)
tree353b1b397a8a57c462bf6eb5ccee46b6ac85f35f /src/schemas.ts
initial commit
Diffstat (limited to 'src/schemas.ts')
-rw-r--r--src/schemas.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/schemas.ts b/src/schemas.ts
new file mode 100644
index 0000000..1b858ff
--- /dev/null
+++ b/src/schemas.ts
@@ -0,0 +1,12 @@
+import { z } from "zod";
+
+export const list = z.object({
+ limit: z
+ .string()
+ .optional()
+ .default("5")
+ .refine((data) => {
+ const parsed = parseInt(data);
+ return !isNaN(parsed);
+ }),
+});