diff --git a/assets/script.js b/assets/script.js index 082caa1..d980d0e 100644 --- a/assets/script.js +++ b/assets/script.js @@ -1,4 +1,4 @@ -function doAccountAction(requestData, successMessage, failureMessage) { +function doAccountAction(requestData, successMessage, failureMessage, silent=false) { return fetch('/account', { method: 'POST', body: requestData, @@ -10,7 +10,9 @@ function doAccountAction(requestData, successMessage, failureMessage) { return response.json(); }) .then(data => { - handleResponse(data, successMessage, failureMessage); + if(!silent) { + handleResponse(data, successMessage, failureMessage); + } return data; // Returning the response data for further processing }) .catch((error) => {