Tell us what’s happening:
I am working on freeCodeCamp Exercise Tracker Microservice in Replit.
I put in my MONGO_URI code in the Replit Secret Environment Variable file.
I install the latest versions of mongoose and mongodb on Replit.
I was able to pass 7 tests. I need help with the 9 failed tests.
- Each element in the array returned from
GET /api/users
is an object literal containing a user’susername
and_id
. - The response returned from
POST /api/users/:_id/exercises
will be the user object with the exercise fields added. - A request to a user’s log
GET /api/users/:_id/logs
returns a user object with acount
property representing the number of exercises that belong to that user. - A
GET
request to/api/users/:id/logs
will return the user object with alog
array of all the exercises added. - Each item in the
log
array that is returned fromGET /api/users/:id/logs
is an object that should have adescription
,duration
, anddate
properties. - The
description
property of any object in thelog
array that is returned fromGET /api/users/:id/logs
should be a string. - The
duration
property of any object in thelog
array that is returned fromGET /api/users/:id/logs
should be a number. - The
date
property of any object in thelog
array that is returned fromGET /api/users/:id/logs
should be a string… Use thedateString
format of theDate
API. - You can add
from
,to
andlimit
parameters to aGET /api/users/:_id/logs
request to retrieve part of the log of any user.from
andto
are dates inyyyy-mm-dd
format.limit
is an integer of how many logs to send back.
Your project link(s)
Please take a look at the Replit code. I appreciate any help.
- What codes am I missing?
- Are there any syntax errors in Replit?
- Please show me how I can fix this.
thank you
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Challenge: Exercise Tracker
Link to the challenge: