I am trying to get a user by id in a nodeJS, mongodb, and express app(a tutorial). What I receive in postman is that it looks for the endpoint 'user/885427r8448734', when id is equal to 885427r8448734, and it simply doesn't work. I put below 3 pics to better explain
Asked
Active
Viewed 39 times
0
-
https://i.stack.imgur.com/tJO9R.png – andrei.andrei_97 Jul 04 '20 at 11:39
-
2better to post your code instead of image – kedar sedai Jul 04 '20 at 11:44
-
`http://localhost:3000/users/5effa5c6d574724090e3c357`send this `URL` you are sending `users` at middleware, not `user` – kedar sedai Jul 04 '20 at 11:53
-
Thanks Kedar, it solved my problem! – andrei.andrei_97 Jul 04 '20 at 17:35