Hello everyone, I am currently doing a project that simulates planets and launches in nasa. have a problem when I try to implement the SaveLaunch function and save a launch, I get the following error:
What does the code look like? Looks like you’re calling findOne on the wrong object as whatever you’re calling it on does not have that method available.
planets only have names and i’ve imported them to mongo succesfully from csv file, I wanted to handle a case if I try to create a launch(that has planets as destinations) with a planet that doesn’t exist, that it won’t let me create the launch. this how the schema of planet and the definition looks like
Hi vera_naroditski,
I have faced the same issue with this problem. the issue lies in your launch object, If you rename the property called destination to the target in your launch object it will be resolved.
Thanks