summaryrefslogtreecommitdiff
path: root/src/schemas.ts
diff options
context:
space:
mode:
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);
+ }),
+});