mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
commit
9290c51477
1 changed files with 11 additions and 7 deletions
|
@ -364,9 +364,9 @@ submitPost = function (post) {
|
|||
if (Meteor.isServer) {
|
||||
Meteor.defer(function () { // use defer to avoid holding up client
|
||||
// run all post submit server callbacks on post object successively
|
||||
post = postAfterSubmitMethodCallbacks.reduce(function(result, currentFunction) {
|
||||
return currentFunction(result);
|
||||
}, post);
|
||||
postAfterSubmitMethodCallbacks.forEach(function(currentFunction) {
|
||||
currentFunction(post);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -492,10 +492,14 @@ Meteor.methods({
|
|||
|
||||
// ------------------------------ Callbacks ------------------------------ //
|
||||
|
||||
// run all post after edit method callbacks successively
|
||||
postAfterEditMethodCallbacks.forEach(function(currentFunction) {
|
||||
currentFunction(modifier, postId);
|
||||
});
|
||||
if (Meteor.isServer) {
|
||||
Meteor.defer(function () { // use defer to avoid holding up client
|
||||
// run all post after edit method callbacks successively
|
||||
postAfterEditMethodCallbacks.forEach(function(currentFunction) {
|
||||
currentFunction(modifier, post);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------ After Update ------------------------------ //
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue