Koha/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js
Jonathan Druart 14e5e175fc
Bug 33103: Embed aliases in GET /vendors
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:38 -03:00

23 lines
544 B
JavaScript

import HttpClient from "./http-client";
export class AcquisitionAPIClient extends HttpClient {
constructor() {
super({
baseURL: "/api/v1/acquisitions/",
});
}
get vendors() {
return {
getAll: (query) =>
this.get({
endpoint: "vendors?" + (query || "_per_page=-1"),
headers: {
"x-koha-embed": "aliases",
},
}),
};
}
}
export default AcquisitionAPIClient;