I try to use chai to make a request to my API on the /login route, but it cannot complete, I can use the same structure to do it for another route but it is not working in the best way.
enter image description here
enter image description here
If you want to investigate by looking at the code in more depth, here is the pullrequest:
https://github.com/juliomatiastrybe/blogs-api-sequelize/pull/4/commits/7501936be512f06600d970fc8ced895f69a0acf7
I used debug to try to see the error but I couldn’t, and even when making a request for another route, the middleware doesn’t work as it should, for example on routes that have token validation, I can’t validate it, even though the API is functional and can do the same process via thunderClient.
Júlio César is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.