1
我试图更新我的流星应用程序中的一个集合,并且出现以下错误:允许在流星应用程序中使用授权分支
更新失败:403 - 访问被拒绝。无法替换受限集合中的文档。
在我有以下代码服务器:
Songs = new Meteor.Collection("songs");
PlayLists = new Meteor.Collection('playlists');
PlayChannels = new Meteor.Collection('playchannels');
Meteor.publish('songs', function() {
return Songs.find();
});
Meteor.publish('playlists', function() {
return PlayLists.find();
});
Meteor.publish('playchannels', function() {
return PlayChannels.find();
});
Meteor.startup(function() {
Songs.allow({
insert: function() { return true; },
update: function() { return true; },
remove: function() { return true; },
fetch: function() { return true; }
});
PlayChannels.allow({
insert: function() { return true; },
update: function() { return true; },
remove: function() { return true; },
fetch: function() { return true; }
});
PlayLists.allow({
insert: function() { return true; },
update: function() { return true; },
remove: function() { return true; },
fetch: function() { return true; }
});
});
而且我打出电话如下:
PlayChannels.update({_id: Session.get('playchannel')},{current:Session.get('current')});
我在做什么错?
我在这里也面临同样的问题。你怎么处理它BTW? – 2012-09-30 20:25:44
同样在这里...不知道该怎么做。 – TigrouMeow 2012-10-13 04:23:23