Tell us what’s happening:
I have been trying to figure out what I may be doing wrong here. I am using mongo for this project. I am able to save the exercises to the database, and read the data.
I am also managing to retrieve both the USER for the specific ID entered in the ID field of EXERCISE, and also retrieve the same data that I entered in the fields of EXERCISE.
I am then trying to combine both objects retrieved from Mongo using the Object.assign(). I seem to be doing the job, and then responding to json with the new merged Object.
These lines of code are 130-137 if the data is empty, or 155-162 if the data is correct.
You can see from the json that both objects are merged together and should be displaying what the test requires (unless I have a complete misunderstanding of the test.
Edit 1: I may have been doing a mistake, in which I was reading the exercise info rather than just adding the user info to the exercise input. Made this change and I avoided the problem of having to merge objects, however, still cannot pass the test…
Your project link(s)
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Challenge: Exercise Tracker
Link to the challenge: