The test where the log array is retrieved is passing except for the test for date in string form. However, I used curl to do the request manually to see what is returned and the value is a string. Here is the curl command and response:
user@Users-MacBook-Pro ~ % curl https://boilerplate-project-exercisetracker.cavasian.repl.co/api/users/621db2e155979199c966f85c/logs
{“username”:“fcc_test_16461135052”,“count”:2,"_id":“621db2e155979199c966f85c”,“log”:[{“description”:“test”,“duration”:60,“date”:“Mon Jan 01 1990”},{“description”:“test”,“duration”:60,“date”:“Wed Jan 03 1990”}]}
Here are the test/results for the relevant tests:
You can make a GET
request to /api/users/:_id/logs
to retrieve a full exercise log of any user. - “Passed”
A request to a user’s log GET /api/users/:_id/logs
returns a user object with a count
property representing the number of exercises that belong to that user. - “Passed”
A GET
request to /api/users/:id/logs
will return the user object with a log
array of all the exercises added. - “Passed”
Each item in the log
array that is returned from GET /api/users/:id/logs
is an object that should have a description
, duration
, and date
properties. - “Passed”
The description
property of any object in the log
array that is returned from GET /api/users/:id/logs
should be a string. - “Passed”
The duration
property of any object in the log
array that is returned from GET /api/users/:id/logs
should be a number. - “Passed”
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- “Failed”
Your project link(s)
solution: https://replit.com/@cavasian/boilerplate-project-exercisetracker
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36
Challenge: Exercise Tracker
Link to the challenge: