saintedlama / passport-local-mongoose

Passport-Local Mongoose is a Mongoose plugin that simplifies building username and password login with Passport
MIT License
1.18k stars 294 forks source link

TypeError: teacherSchema.plugin is not a function #375

Open imengolea opened 1 year ago

imengolea commented 1 year ago

const teacherSchema =({ profession: String, teacherFName:{ type: String, immutable: true }, bornDate: Number, priceperhour: Number, videolink:String, email:String, password:String, skills:[skillsSchema],

});

teacherSchema.plugin(passportLocalMongoose);

const Teacher = mongoose.model('Teacher', teacherSchema);