Lines 6-12
export class SysprefAPIClient extends HttpClient {
Link Here
|
6 |
baseURL: "/cgi-bin/koha/svc/config/systempreferences", |
6 |
baseURL: "/cgi-bin/koha/svc/config/systempreferences", |
7 |
}); |
7 |
}); |
8 |
} |
8 |
} |
9 |
|
|
|
10 |
get sysprefs() { |
9 |
get sysprefs() { |
11 |
return { |
10 |
return { |
12 |
get: variable => |
11 |
get: variable => |
Lines 16-22
export class SysprefAPIClient extends HttpClient {
Link Here
|
16 |
update: (variable, value) => |
15 |
update: (variable, value) => |
17 |
this.post({ |
16 |
this.post({ |
18 |
endpoint: "", |
17 |
endpoint: "", |
19 |
body: "pref_%s=%s".format(variable, value), |
18 |
body: "pref_%s=%s&csrf_token=%s".format( |
|
|
19 |
variable, |
20 |
value, |
21 |
csrf_token |
22 |
), |
20 |
headers: { |
23 |
headers: { |
21 |
"Content-Type": |
24 |
"Content-Type": |
22 |
"application/x-www-form-urlencoded;charset=utf-8", |
25 |
"application/x-www-form-urlencoded;charset=utf-8", |
23 |
- |
|
|