From b475c49829ab7bab59dcb8f3f9473caceaffb069 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 31 Dec 2021 01:24:08 +0200 Subject: [PATCH] update event listeners --- src/public/js/home.js | 2 +- src/public/js/module/following.js | 2 ++ src/public/js/module/post.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) 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 {