Getting issue while passing _id to find an existing item
Creating a job portal website using react and mongodb. A user logins and save the job. So a model is created to save the jobs and created Controller. Before saving a job checks if it is exist or not by passing the _id which fetched from the req.params and the userId which from the req.payload . But it doesn’t checks the existingJob and creating it as a new object.
I keep getting this error when I run it on postman : “TypeError: Product.create is not a function”
I did all the connections right but when I try to test it on postman it shows this error instead.
this “TypeError: Product.create is not a function” ruined my day
I did all the connections right but when I try to test it on postman it shows this error instead.
Mongoose TTL expiring even when condition is false
I have this mongoose Schema, I would like to the model delete itself after 60 seconds if the field paid is false.
However when using TTL the document expires even if the field paid is true.
I’ve even tried to create a TTL inside the schema but with no success. What should I do?