mirror of
https://github.com/vale981/Vulcan
synced 2025-03-12 05:26:38 -04:00
19 lines
No EOL
364 B
JavaScript
19 lines
No EOL
364 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
|
|
});
|
|
|
|
var postId=Posts.insert(post);
|
|
|
|
Meteor.call('upvotePost', postId);
|
|
|
|
return postId;
|
|
}
|
|
}); |