@@ -, +, @@ commit 821808ec31176d662e518418c9ff8a71948e1a4b Bug 32939: Use APIClient to replace PATCH requests + const body = params.body + ? typeof str === "string" + ? params.body + : JSON.stringify(params.body) + : undefined; typeof str === "string" typeof params.body === "string" "pref_var=value" pref_var=value --- koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js +++ a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js @@ -52,7 +52,7 @@ class HttpClient { post(params = {}) { const body = params.body - ? typeof str === "string" + ? typeof params.body === "string" ? params.body : JSON.stringify(params.body) : undefined; @@ -65,7 +65,7 @@ class HttpClient { put(params = {}) { const body = params.body - ? typeof str === "string" + ? typeof params.body === "string" ? params.body : JSON.stringify(params.body) : undefined; @@ -105,7 +105,7 @@ class HttpClient { patch(params = {}) { const body = params.body - ? typeof str === "string" + ? typeof params.body === "string" ? params.body : JSON.stringify(params.body) : undefined; --