Bugzilla – Attachment 179513 Details for
Bug 38993
Merge fetch files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38993: Fix sysprefs fetch from cypress
Bug-38993-Fix-sysprefs-fetch-from-cypress.patch (text/plain), 1.89 KB, created by
Jonathan Druart
on 2025-03-20 11:44:32 UTC
(
hide
)
Description:
Bug 38993: Fix sysprefs fetch from cypress
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-20 11:44:32 UTC
Size:
1.89 KB
patch
obsolete
>From 2476369f2f8d148ef450604dc8fba7b4ac227916 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 20 Mar 2025 12:07:04 +0100 >Subject: [PATCH] Bug 38993: Fix sysprefs fetch from cypress > >Conflict between bug 38993 and bug 36025 > >We pass the token in the header, and retrieve it from the meta tag. >--- > .../prog/js/fetch/system-preferences-api-client.js | 5 ++--- > t/cypress/support/e2e.js | 2 +- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >index 39c27925fd6..49b2f3212bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >@@ -14,10 +14,9 @@ export class SysprefAPIClient { > update: (variable, value) => > this.httpClient.post({ > endpoint: "", >- body: "pref_%s=%s&csrf_token=%s".format( >+ body: "pref_%s=%s".format( > encodeURIComponent(variable), >- encodeURIComponent(value), >- csrf_token >+ encodeURIComponent(value) > ), > headers: { > "Content-Type": >diff --git a/t/cypress/support/e2e.js b/t/cypress/support/e2e.js >index 37dc1c750fa..269f5eabd56 100644 >--- a/t/cypress/support/e2e.js >+++ b/t/cypress/support/e2e.js >@@ -1818,7 +1818,7 @@ mysql.addCommands(); > > Cypress.Commands.add("set_syspref", (variable, value) => { > cy.window().then(win => { >- const client = win.APIClient.syspref; >+ const client = win.APIClient.sysprefs; > return client.sysprefs.update(variable, value); > }); > }); >-- >2.34.1
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 38993
:
177316
|
177317
|
177318
|
177337
|
177338
|
177339
|
177342
|
177343
|
177344
|
177345
|
177346
|
177347
|
177348
|
179100
|
179101
|
179102
|
179103
|
179106
|
179107
|
179108
|
179109
| 179513 |
179550