Update next-connect middleware to return next() to fix error handling

This commit is contained in:
Aaron William Po
2023-07-17 15:44:32 -04:00
parent 8ed798ce60
commit bfbf7c3cf3
9 changed files with 167 additions and 50 deletions

View File

@@ -15,14 +15,14 @@ const CreateBreweryPostSchema = z.object({
invalid_type_error: 'Description must be a string.',
})
.min(1, { message: 'Description is required.' })
.max(500, { message: 'Description is too long.' }),
.max(1500, { message: 'Description is too long.' }),
address: z
.string({
required_error: 'Address is required.',
invalid_type_error: 'Address must be a string.',
})
.min(1, { message: 'Address is required.' })
.max(100, { message: 'Address is too long.' }),
.max(300, { message: 'Address is too long.' }),
city: z
.string({