Exercise Tracker Query Strings Runs As Expected But Failing One Challenge?

Tell us what’s happening:
Sigh… it has become a recurring theme on my troubles here in FCC. My app runs perfectly as expected in the challenges but it fails in one challenge that seem to be nitpicky on things I seem to miss. I’d like someone look over my code if I’m missing something or do I need to change something in order to pass this story:

  • You can add from , to and limit parameters to a /api/exercise/log request to retrieve part of the log of any user. from and to are dates in yyyy-mm-dd format. limit is an integer of how many logs to send back.

I tested my app multiple times for query strings but it still wont pass. I need someone else’s point of view if I’m missing something something. Thanks

My repl.it live link is here: https://boilerplate-project-exercisetracker.synerjay.repl.co/

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Exercise Tracker

Link to the challenge:

Can someone help me out? I 've searched everywhere for answers including common problems like parseInt for duration and such and still cant figure out what the problem is. Could it be the date format?

Probably server.js line 157:

const newarrayLogUser = arrayLogUser.filter((log)=> log.date === fromDate || log.date === toDate);

You’re filtering by exact dates.

1 Like

Argh! Handling dates in Javascript will be my downfall! Thank you!

It’s funny coz the moment I realized that was the problem was the same time you replied to my message lol. Thank you again!