Exercise Tracker Test Cases Failing!

Hi everyone, I’m trying to complete the exercise tracker project and my project keeps failing the fourth and sixth test cases and I can’t seem to understand why.

I keep comparing my apps JSON response to the one provided by the FCC example and they’re pretty much identical, but I still get the fat ol’ X on those test cases.

I’m at my wits end and any help would be appreciated.

link to my project: https://glitch.com/~gorgeous-general-rudbeckia

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36.

Challenge: Exercise Tracker

Link to the challenge:

For the fourth challenge you need to rename the userId property to `_id. This test is bugged, so don’t sweat over it. Your solution for the this test case is correct though. This fix is just for the sake of passing this test:

res.json({
        // userId:result._id,
        _id: result._id,
        username:result.username,
        description:desc,
        duration:duration,
        date:date.toDateString()
      });

For the last challenge, you’re not limiting the logs.

See this URL: https://gorgeous-general-rudbeckia.glitch.me/api/exercise/log?userId=5ed951bc9999e100ed835e6e&limit=1

We’re limiting the logs to 1, but it’s returning 2 (all available) logs.
Hint: Try sliceing the userLogs array if the limit param is defined.

1 Like

Thank you so much!!!
The _id thing really got me, and for the 6th test case, I misread the instructions. I thought it was from and (to or limit) vs (from and to) or limit.

But again thank you so much for clearing this stuff up!