嗨,我不明白为什么这不起作用?
Notifications.update({'userId':Meteor.userId(), 'notifyUserId':notifyFriendId}, {$set: {read: 1}});
我也有更新允许方法
Notifications = new Meteor.Collection('Notifications');
Notifications.allow({
update: function(userId, doc) {
return true;
}
});
出现错误:
Uncaught Error: Not permitted. Untrusted code may only update documents by ID. [403]