skip to Main Content

findbyID is not returning individual item in db, 404 not found error , mongodb, mongoose

I have the following Cycle Schema const mongoose=require('mongoose') const Schema = mongoose.Schema; const cycleSchema= new Schema({ startDate:{type:Date,required:true}, endDate:{type:Date,required:true}, users:[ { firstName:String, lastName:String, goals:[{ mainGoal:String, progress:{ type:Number, default:0 }, subTasks: [{ task:String, done:Boolean }] }] } ] },{ timestamps:true }) const…

VIEW QUESTION
Back To Top
Search