swa*_*ran 5 javascript postman
如果我想在下面的架构中添加一些数据:
'use strict';
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var notificationsSchema = new mongoose.Schema({
notifyMessage : {
title : { type: String },
des : { type: String }
},
notifier : { type: String },
recipient : [{
id : { type: String },
status : {type:String,trim:true,enum:['read','unread']}
}]
});
module.exports = mongoose.model('notification_tracker', notificationsSchema);
Run Code Online (Sandbox Code Playgroud)
但它以这种方式结束了..
选择原始单选按钮并确保将其设置为JSON(application/json),然后像这样粘贴或添加 JSON 对象
{
notifyMessage: {
title: "",
des: ""
},
notifier: "",
recipient: [{
id: "",
status:""
}, {
id: "",
status:""
}]
}
Run Code Online (Sandbox Code Playgroud)
使用这种格式
| 归档时间: |
|
| 查看次数: |
907 次 |
| 最近记录: |