I give up.
I think the code works fine, the only issue might be the ObjectId because it’s being discussed on the forum.
I’ve used it in the schema, in the user creation function and the add exercise function. I can log the typeof and it says ‘object’ but when the json object is returned, I see a string Maybe I’m seeing it’s value and not the entire object.
I’m now at the trial and error stage. Maybe I should create a separate schema for the exercises? A hint pointing me towards ‘exit’ would be enormously appreciated.
Is a url to the exercise enough ?
I had added the functions but I don’t know if that’s ok. Tell me if you want me to post them as well.
Thank you and greets,