diff --git a/services/actions.js b/services/actions.js index d2c2350bd..ba9f1fde5 100644 --- a/services/actions.js +++ b/services/actions.js @@ -75,7 +75,7 @@ module.exports = class ActionsService { }); // Emit that there was a new action created. - events.emitAsync(ACTIONS_NEW, foundAction); + await events.emitAsync(ACTIONS_NEW, foundAction); return foundAction; } @@ -230,7 +230,7 @@ module.exports = class ActionsService { } // Emit that the action was deleted. - events.emitAsync(ACTIONS_DELETE, action); + await events.emitAsync(ACTIONS_DELETE, action); return action; } diff --git a/services/comments.js b/services/comments.js index 07c822459..ac7d6ae45 100644 --- a/services/comments.js +++ b/services/comments.js @@ -46,7 +46,7 @@ module.exports = class CommentsService { const savedCommentModel = await commentModel.save(); // Emit that the comment was created! - events.emitAsync(COMMENTS_NEW, savedCommentModel); + await events.emitAsync(COMMENTS_NEW, savedCommentModel); return savedCommentModel; } @@ -138,7 +138,7 @@ module.exports = class CommentsService { created_at: new Date(), }); - events.emitAsync(COMMENTS_EDIT, originalComment, editedComment); + await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment); return editedComment; } @@ -267,7 +267,7 @@ module.exports = class CommentsService { // Emit that the comment was edited, and pass the original comment and the // edited comment. - events.emitAsync(COMMENTS_EDIT, originalComment, editedComment); + await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment); return editedComment; }