koajs / discussions

KoaJS Discussions
2 stars 2 forks source link

Cannot make middleware to coerce type of query parameter #14

Open georgyfarniev opened 4 years ago

georgyfarniev commented 4 years ago

The problem is that query serialized back to string in setter, so I cannot write middleware that will convert some parameters to number, and I have to do it only in handler, which is inconvenient :(

cast @dead-horse

I need to be able to modify it, for coercion of validated data.

dead-horse commented 4 years ago

can you provider a sample code to make us understand your need more clearly?