WeezyEzo
Ability to mutate/extend `input` from middlewares
Hi
I have a global middleware that should run for every route. This middleware simply coerces
''
(empty string) to undefined
for the whole input
object.
Here is my setup:
the function coerceEmptyStringsToUndefined
is guarnteed to work as expected. Here is the implementation btw:
The problem: this code throws a validation error
The error is from zod
which is: {received: '""', expected: 'number'}
.20 replies