feat: improve validations

This commit is contained in:
Agusti Fernandez Pardo
2022-03-27 15:15:46 +02:00
parent c561b16f85
commit 0e3131d866
6 changed files with 15 additions and 59 deletions
+1 -2
View File
@@ -9,8 +9,7 @@ const schemaApiKey = z
expiresAt: z.date().optional(), // default is 30 days
note: z.string().min(1).optional(),
})
.strict();
.strict(); // Adding strict so that we can disallow passing in extra fields
const withValidApiKey = withValidation({
schema: schemaApiKey,
type: "Zod",