mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00
47 lines
941 B
JavaScript
47 lines
941 B
JavaScript
// Posts
|
|
|
|
Posts = new Meteor.Collection('posts');
|
|
|
|
Meteor.publish('posts', function() {
|
|
return Posts.find();
|
|
});
|
|
|
|
Meteor.startup(function(){
|
|
Posts.allow({
|
|
insert: function(){ return true; } //TODO: change to false
|
|
, update: function(){ return false; }
|
|
, remove: function(){ return false; }
|
|
});
|
|
});
|
|
|
|
// Comments
|
|
|
|
Comments = new Meteor.Collection('comments');
|
|
|
|
Meteor.publish('comments', function() {
|
|
return Comments.find();
|
|
});
|
|
|
|
Meteor.startup(function(){
|
|
Comments.allow({
|
|
insert: function(){ return false; }
|
|
, 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; }
|
|
});
|
|
});
|