I’m almost done with the Exercise Tracker from the course. It can surely be done better but I’m passing all tests except the one before the last. It says the following: the date property of any object in the log array that is returned from GET /api/users/:_id/logs should be a string. Use the dateString format of the Date API.
However, I am actually using dateString and it seems that I’m returning a string. I used typeof to check for it.
I really don’t understand where the bug is. Can anyone help me spot it ?
You can POST to /api/users/:_id/exercises with form data description, duration, and optionally date. If no date is supplied, the current date will be used.
Not sure why this isn’t failing because you are not handling the optional date.
Thanks for mentionning this, I had not realized it indeed. Gonna implement it ASAP. This might also be why I’m having the issue mentionned in my original post.