Need Help With Exercise Tracker(SOLVED)


Been working on the exercise tracker. It’s almost done but I can’t seem to pass the forth test where a user adds an exercise.

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.

The JSON object that it returns after adding an exercise seems fine to me. So I’m not sure what is wrong.
https://fcc-exercise-zzz.glitch.me
Any help would be appreciated

1 Like

Figured it out. Single digit dates should show up like this Mon Jan 01 1990 not like this Mon Jan 1 1990. So I should have used the toDateString() method :man_facepalming:.

2 Likes