Closed a7medmo7med9 closed 2 years ago
Currently, we are treating .use
just as a handler. For now, you can add that middleware before the post handler like below:
.post(validateApiDate(loginSchema), async (req, res) =>
and remove the .use
.
Just to confirm that this is a valid error.
even if .use
matches, since there is no .METHOD
, nothing should be executed. Will be fixed in https://github.com/hoangvvo/next-connect/pull/196
when i send request to post method with get method it works and i don't even use get method on this url
my code
how can i get 404 page not found on [onNoMatch] instead of this response