Tell us what’s happening:
I do not understand what is wrong with my code. doing validation against the example code link on the page. everything looks exactly the same. But I am failing the following 2 test. BUT MY CODE WORKS!
I can add an exercise to any user by posting form data userId(_id), description, duration, and optionally date to /api/exercise/add. If no date supplied it will use current date. App will return the user object with the exercise fields added.
I can retrieve a full exercise log of any user by getting /api/exercise/log with a parameter of userId(_id). App will return the user object with added array log and count (total exercise count).
I made the edit you suggested and I am able to pass one of the 2 test.
I still can’t pass the user add test.
I can add an exercise to any user by posting form data userId(_id), description, duration, and optionally date to /api/exercise/add. If no date supplied it will use current date. App will return the user object with the exercise fields added.