Back End Development and APIs Projects - Exercise Tracker

Though the response are in correct format I am not able to pass the following tests:

  • The response returned from POST /api/users/:_id/exercises will be the user object with the exercise fields added.

  • You can make a GET request to /api/users/:_id/logs to retrieve a full exercise log of any user.

  • 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.

  • A GET request to /api/users/:_id/logs will return the user object with a log array of all the exercises added.

Your project link(s)

solution: boilerplate-project-exercisetracker - Replit

Your browser information:

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

Challenge: Back End Development and APIs Projects - Exercise Tracker

Link to the challenge:

Hey there,

I only checked the first response by submitting new user and I got this -

{
  "username": "Dorfieeee",
  "count": 0,
  "log": [],
  "_id": "647caadd1046a1b1e222fff0"
}

but the returned value should be in this format as described on the challenge page.

User:

{
  "username": "fcc_test",
  "_id": "5fb5853f734231456ccb3b05"
}

It seems you are returning Log response where you should be returing User response.

There can be more issues onwards.

Good Luck

There ain’t any problem with the tests you mentioned they are getting accepted , the main problem starts with this test:
The response returned from POST /api/users/:_id/exercises will be the user object with the exercise fields added.
However if you will try those that are failing the response seems to be matching the one which is required yet it fails

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.