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