如何在mongodb / mongoose中修改私有路由的模式方法?

时间:2018-09-20 13:50:58

标签: node.js mongodb authentication mongoose-schema

const contactSchema = mongoose.Schema({
name: {
  type:String,
  required: true
 },
mo_no: {
  type: Number,
  required: true
 },
creator: {
  type: mongoose.Schema.Types.ObjectId,
  required: true
 }
});
const Contact = module.exports = mongoose.model('Contact', contactSchema);

当我执行此服务器时,发送了200个状态,但正在添加数据。有解决办法吗?

0 个答案:

没有答案