mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
19 lines
No EOL
568 B
JavaScript
19 lines
No EOL
568 B
JavaScript
Meteor.methods({
|
|
updateCategories: function () {
|
|
// TODO: see if this method is still necessary
|
|
if(isAdmin(Meteor.user())){
|
|
Posts.find().forEach(function(post){
|
|
if(post.categories){
|
|
console.log('Found categories for post "'+post.title+'"');
|
|
Posts.update(post._id,{$set:{userId:post.user_id}}, function(error){
|
|
console.log(error);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
},
|
|
giveInvites: function () {
|
|
if(isAdmin(Meteor.user()))
|
|
Meteor.users.update({}, {$inc:{inviteCount: 1}}, {multi:true});
|
|
}
|
|
}); |