Open enquestor opened 2 years ago
Hi, @Allen-Hu!
Currently, any operation that modifies the request's body
(or query
, headers
) is not supported. We use joi
to perform validation only. Anyway, I think you raise a valid point here, and I will take a look to try adding support for this anytime soon.
I think this may be somehow related to #9 too.
And yes, you are doing the right thing accessing req.body
from your handler :-)
I am trying to add a default value to an optional parameter, but
Joi.default()
doesn't seem to take effect. My code looks somehow like this:I'm guessing either I shouldn't access body with
req.body
or this is not supported, is it? Thanks in advance.