Koha/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js
Jonathan Druart 9597b88ed2
Bug 33289: Add API client class to interact with svc/config/systempreferences
On bug 30708 we will need to modify sysprefs from the UI (Vue app), it
could be useful for other developments as well and so it is moved on its
own bug report.

Test plan:
It can be tested independently of bug 30708 using the following code:

const client = APIClient.sysprefs
client.sysprefs
    .update(
        "CardnumberLength",
        "42"
    )

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-13 11:47:56 -03:00

13 lines
488 B
JavaScript

import ERMAPIClient from "./erm-api-client";
import PatronAPIClient from "./patron-api-client";
import AcquisitionAPIClient from "./acquisition-api-client";
import AVAPIClient from "./authorised-values";
import SysprefAPIClient from "./system-preferences-api-client";
export const APIClient = {
erm: new ERMAPIClient(),
patron: new PatronAPIClient(),
acquisition: new AcquisitionAPIClient(),
authorised_values: new AVAPIClient(),
sysprefs: new SysprefAPIClient(),
};