Vulcan/lib/post.js
Tom Coleman 3d7f2b4afd Moved post creation logic to the server side.
Also made it + commenting latency compensated.
2012-10-04 11:45:12 +10:00

15 lines
No EOL
300 B
JavaScript

Meteor.methods({
post: function(post){
post = _.extend(post, {
userId: Meteor.user()._id,
author: Meteor.user().username,
submitted: new Date().getTime(),
votes: 0,
comments: 0,
baseScore: 0,
score: 0
});
return Posts.insert(post);
}
});