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.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-03-20 12:07:04 +01:00 committed by Katrin Fischer
parent cfb5d05ed9
commit 2fc1b5f825
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 3 additions and 4 deletions

View File

@ -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":

View File

@ -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);
});
});