Jonathan Druart
17b134fcb9
In commit f1078daf8f
Bug 34219: Allow getAll to receive additional URL parameters
We needed to call getAll instead of get to fetch all the vendors
Test plan:
Have more than 20 vendors and create/edit an agreement.
Notice that the vendor list contains all the vendors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
25 lines
581 B
JavaScript
25 lines
581 B
JavaScript
import HttpClient from "./http-client";
|
|
|
|
export class AcquisitionAPIClient extends HttpClient {
|
|
constructor() {
|
|
super({
|
|
baseURL: "/api/v1/acquisitions/",
|
|
});
|
|
}
|
|
|
|
get vendors() {
|
|
return {
|
|
getAll: (query, params) =>
|
|
this.getAll({
|
|
endpoint: "vendors",
|
|
query,
|
|
params,
|
|
headers: {
|
|
"x-koha-embed": "aliases",
|
|
},
|
|
}),
|
|
};
|
|
}
|
|
}
|
|
|
|
export default AcquisitionAPIClient;
|