Bugzilla – Attachment 148595 Details for
Bug 33290
Incorrect variable used in http-client.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33290: Fix incorrect variable in http-client.js
Bug-33290-Fix-incorrect-variable-in-http-clientjs.patch (text/plain), 2.12 KB, created by
Pedro Amorim
on 2023-03-23 10:10:33 UTC
(
hide
)
Description:
Bug 33290: Fix incorrect variable in http-client.js
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-03-23 10:10:33 UTC
Size:
2.12 KB
patch
obsolete
>From 828348ea6eb16c2d2bc445eb762ce4343c081efe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 21 Mar 2023 08:52:42 +0100 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js >index 3745822ade..ac999e9f9a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js >+++ b/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; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33290
:
148441
|
148595
|
148630