View | Details | Raw Unified | Return to bug 33289
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js (+2 lines)
Lines 2-11 import ERMAPIClient from "./erm-api-client"; Link Here
2
import PatronAPIClient from "./patron-api-client";
2
import PatronAPIClient from "./patron-api-client";
3
import AcquisitionAPIClient from "./acquisition-api-client";
3
import AcquisitionAPIClient from "./acquisition-api-client";
4
import AVAPIClient from "./authorised-values";
4
import AVAPIClient from "./authorised-values";
5
import SysprefAPIClient from "./system-preferences-api-client";
5
6
6
export const APIClient = {
7
export const APIClient = {
7
    erm: new ERMAPIClient(),
8
    erm: new ERMAPIClient(),
8
    patron: new PatronAPIClient(),
9
    patron: new PatronAPIClient(),
9
    acquisition: new AcquisitionAPIClient(),
10
    acquisition: new AcquisitionAPIClient(),
10
    authorised_values: new AVAPIClient(),
11
    authorised_values: new AVAPIClient(),
12
    sysprefs: new SysprefAPIClient(),
11
};
13
};
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/system-preferences-api-client.js (-1 / +25 lines)
Line 0 Link Here
0
- 
1
import HttpClient from "./http-client";
2
3
export class SysprefAPIClient extends HttpClient {
4
    constructor() {
5
        super({
6
            baseURL: "/cgi-bin/koha/svc/config/systempreferences",
7
        });
8
    }
9
10
    get sysprefs() {
11
        return {
12
            update: (variable, value) =>
13
                this.post({
14
                    endpoint: "",
15
                    body: "pref_%s=%s".format(variable, value),
16
                    headers: {
17
                        "Content-Type":
18
                            "application/x-www-form-urlencoded;charset=utf-8",
19
                    },
20
                }),
21
        };
22
    }
23
}
24
25
export default SysprefAPIClient;

Return to bug 33289