diff --git a/src/public/js/home.js b/src/public/js/home.js index 8e1fca2..3fbe5d7 100644 --- a/src/public/js/home.js +++ b/src/public/js/home.js @@ -5,7 +5,7 @@ $(document).ready(function() { ModuleFeed.load('#moduleFeed', true); // Event listeners - $(document).on('modulePost.add:success', function(/*event, response*/) { + $(document).on('ModulePost.add:success', function(/*event, response*/) { ModuleFeed.load('#moduleFeed', true); }); diff --git a/src/public/js/module/following.js b/src/public/js/module/following.js index 26988c7..8a0d771 100644 --- a/src/public/js/module/following.js +++ b/src/public/js/module/following.js @@ -90,6 +90,8 @@ var ModuleFollowing = { ModuleFollowing.load(list, reFresh); } + $(document).trigger('ModuleFollowing.unFollow:success', [response]); + } else { alert(response.message); diff --git a/src/public/js/module/post.js b/src/public/js/module/post.js index be0bdcd..e741442 100644 --- a/src/public/js/module/post.js +++ b/src/public/js/module/post.js @@ -15,7 +15,7 @@ var ModulePost = { input.val(''); - $(document).trigger('modulePost.add:success', [response]); + $(document).trigger('ModulePost.add:success', [response]); } else {