From 2009d73a2b071343bc1d14d248919c3f6ac1331b Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Wed, 13 Aug 2025 17:03:00 +0200 Subject: [PATCH] Fix action registration and unregistration --- lib/www/client/source/src/App.vue | 4 ++-- lib/www/client/source/src/store/modules/notify/actions.js | 2 +- .../client/source/src/store/modules/notify/mutations.js | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/www/client/source/src/App.vue b/lib/www/client/source/src/App.vue index 0586c4d..2109b34 100644 --- a/lib/www/client/source/src/App.vue +++ b/lib/www/client/source/src/App.vue @@ -92,12 +92,12 @@ export default { this.$store.dispatch('registerHandler', { table: '.jwt', - handler: this.handleJWT(context, message) + handler: this.handleJWT }); this.$store.dispatch('registerHandler', { table: 'project', - handler: this.handleProject(context, message) + handler: this.handleProject }); }, diff --git a/lib/www/client/source/src/store/modules/notify/actions.js b/lib/www/client/source/src/store/modules/notify/actions.js index c9d8fee..9127193 100644 --- a/lib/www/client/source/src/store/modules/notify/actions.js +++ b/lib/www/client/source/src/store/modules/notify/actions.js @@ -80,4 +80,4 @@ function processServerEvent({ commit, dispatch, state, rootState }, message) { state.debouncedRunners[table](message); } -export default { registerHandler, processServerEvent }; +export default { registerHandler, unregisterHandler, processServerEvent }; diff --git a/lib/www/client/source/src/store/modules/notify/mutations.js b/lib/www/client/source/src/store/modules/notify/mutations.js index 8dc7e81..5b97803 100644 --- a/lib/www/client/source/src/store/modules/notify/mutations.js +++ b/lib/www/client/source/src/store/modules/notify/mutations.js @@ -30,4 +30,10 @@ function UNREGISTER_HANDLER(state, { table, handler }) { } -export default { setServerEvent, clearServerEvent, setServerConnectionState, REGISTER_HANDLER }; +export default { + setServerEvent, + clearServerEvent, + setServerConnectionState, + REGISTER_HANDLER, + UNREGISTER_HANDLER +};