Vulcan/server/publish.js

48 lines
915 B
JavaScript
Raw Normal View History

2012-08-22 23:24:33 -04:00
// Posts
2012-08-22 21:27:22 -04:00
Posts = new Meteor.Collection('posts');
Meteor.publish('posts', function() {
return Posts.find();
});
2012-08-22 23:24:33 -04:00
Meteor.startup(function(){
Posts.allow({
insert: function(){ return true; }
2012-08-30 21:35:48 -04:00
, update: function(){ return false; }
, remove: function(){ return false; }
2012-08-22 23:24:33 -04:00
});
});
// Comments
Comments = new Meteor.Collection('comments');
Meteor.publish('comments', function() {
return Comments.find();
});
Meteor.startup(function(){
Comments.allow({
insert: function(){ return true; }
2012-08-30 21:35:48 -04:00
, update: function(){ return false; }
, remove: function(){ return false; }
});
});
// MyVotes
MyVotes = new Meteor.Collection('myvotes');
Meteor.publish('myvotes', function() {
return MyVotes.find();
});
Meteor.startup(function(){
MyVotes.allow({
insert: function(){ return false; }
, update: function(){ return false; }
, remove: function(){ return false; }
2012-08-22 23:24:33 -04:00
});
});