コレクションを更新しようとすると、Meteor はサーバー上で次の例外をスローします。
Exception while invoking method '/reports/update' Error:
Did not check() all arguments during call to '/reports/update'
呼び出しは非常に簡単です。
Reports.update({ _id : this._id },{ $set : query });
アップデート:
更新前に「チェック」を追加してみました
2 つのバージョンが同じ結果で試行されました: 例外は引き続きバージョン 1 でスローされます
check(query, Match.Any);
バージョン 2
var update = { $set : query };
check(update, Match.Any);
コレクションには、何でも許可するように定義された allow メソッドがあります。
Reports.allow({
insert: function(){
return true;
},
update: function(){
return true;
},
remove: function(){
return true;
}
})
どこに置くことができcheck(query, Match.Any)
ますか?