diff --git a/lib/www/client/source/src/store/modules/api/actions.js b/lib/www/client/source/src/store/modules/api/actions.js index 459f308..1c0ff8e 100644 --- a/lib/www/client/source/src/store/modules/api/actions.js +++ b/lib/www/client/source/src/store/modules/api/actions.js @@ -1,5 +1,5 @@ -async function api ({state, getters, commit, dispatch}, [resource, init = {}, cb]) { +async function api ({state, getters, commit, dispatch}, [resource, init = {}, cb, opts = {}]) { try { commit("queueRequest"); if (init && init.hasOwnProperty("body")) { @@ -49,7 +49,9 @@ async function api ({state, getters, commit, dispatch}, [resource, init = {}, cb message = body.message; } } - await dispatch('showSnack', [message, "warning"]); + if (!opts?.silent) { + await dispatch('showSnack', [message, "warning"]); + } } } catch (err) { if (err && err.name == "AbortError") return;