My exercise tracker works but not passing some tests

Hi, my Exercise Tracker seems to work fine, however it’s not passing some of the tests.
You can test it here: https://mc-exercisetracker.glitch.me/
Code: GitHub - sekonic/exercisetracker: Excercise Tracker Microservice - FCC Bakcend Certification

I am a noob with mongodb/mongoose so the filter of log array I just do it with Array.filter. This is the only part I am expecting to fail passing the tests,

I will appreciate any feedback about what’s wrong.

Thank you in advance.-

The id is sent as part of the URL, not the body data. You need to use the params to get the id.

Request URL:

https://mc-exercisetracker.glitch.me/api/users/656fa8880aa0ee8f147f49a0/exercises

Payload:

description: test
duration: 60
date: 1990-01-01

Response:

{"error":"NOT VALID _ID"}
2 Likes

Thank you very much, that solved almost all the problems.

1 Like