Tell us what’s happening:
I have been at this for 3+ hours now. I am unable to pass the 4th, 5th and 7th test cases. Please help me.
Thanks in advance.
Your project link(s)
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Challenge: Exercise Tracker
Link to the challenge:
- If there’s an error, you should return immediately.
if (err) return console.log(err)
- Make sure to convert the date to the right format. Use
- Data coming back from mongodb might be quite different from what you’re expecting. I use console.log to make sure I understand how the return data are formatted.
- You’re returning all exercises when adding a new exercise. That is not correct. I made the same error. It is very easy to misread but in their description
"The response returned will be the user object with the exercise fields added." The
exercise fields is referring to description, duration, and date of a newly added exercise.
You return just the newly added exercise along with the user info.
username: . . .
description: . . .
duration: . . .
date: . . . //don't forget toDateString()
I’ll try this first thing in the morning tomorrow. Will update then. Thanks a ton!!
It seemed that the Date format was incorrect. After hours of scouring the internet, I was able to find the FreeCodeCamp python test file against which my output was checked. Manipulating the date seemed to fix the problem. Thank you so much for your help!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.