mirror of
https://github.com/vale981/Vulcan
synced 2025-03-12 13:36:37 -04:00
15 lines
300 B
JavaScript
15 lines
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);
|
||
|
}
|
||
|
});
|