Exercise logger project post /api/users/:_id/exercises troubles

Tell us what’s happening:
Id like some clarification on this and why my code is failing the test.
What do you expect here? As obvious as this sounds, Im not sure what you are asking for here. Do you want me to mutate the actual usr object and send that?

Screenshot 2021-11-08 at 20-23-00 freeCodeCamp org

Output:
Screenshot 2021-11-08 at 20-30-25 https fccbackend4 avatar414 repl co

Relevant Code
Screenshot 2021-11-08 at 20-23-42 fcc_backend4

Your project link(s)

solution: https://replit.com/@avatar414/fccbackend4

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Challenge: Exercise Tracker

Link to the challenge:

It’s the ‘Exercise’ example from the test page. So your format is fine.

If you log the route output:

  _id: new ObjectId("6189fc08259b0cd94da9c179"),
  username: 'fcc_test_16364329048',
  description: 'test',
  duration: '60',
  date: 'Tue Jan 02 1990'
}

you’ll notice that _id is not a string and duration is not a number.

1 Like