]> git.koha-community.org Git - koha.git/commit
Bug 33290: Fix incorrect variable in http-client.js
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 21 Mar 2023 07:52:42 +0000 (08:52 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 11 Apr 2023 09:18:22 +0000 (10:18 +0100)
commit76851d9b47c953a8a50823f99f1a6a80a79f24a2
tree14c834a64742fc6df67c29f85f351aee9ebbe2ae
parent4327ad72db9eca5dc29d90642fc041d034df7533
Bug 33290: Fix incorrect variable in http-client.js

Silly error from
  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"
must be
  typeof params.body === "string"

Test plan:
With this patch, bug 33289 is not working properly. The body contains
  "pref_var=value"
instead of
  pref_var=value
and the syspref `var` contains `value"`

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17de3a6feeed8237108c76ac2bf8e1cfddffc127)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js