代码:
Event = new Mongo.Collection('event');
var eventSchema = new SimpleSchema({
name: {
type: String,
custom: function() {
console.log(this.field('name').value);
}
}
});
Property.allow({
insert: function(userId, doc) {
check(doc, eventSchema);
return true;
}
});
然后在终端中打印事件名称两次。
任何阻止这种想法的想法?