From 14b6580e14b956766916c7e1481f8ec29e466aba Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Mar 2024 06:09:24 +0100 Subject: [PATCH] Bug 36351: Pretty the api-client Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../prog/js/fetch/cataloguing-api-client.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/cataloguing-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/cataloguing-api-client.js index d6d1d1b45d..8f3f4748e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/fetch/cataloguing-api-client.js +++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/cataloguing-api-client.js @@ -11,25 +11,27 @@ export class CataloguingAPIClient extends HttpClient { return { create: bib_info => this.post({ - endpoint: "new_bib/frameworkcode=%s".format( bib_info.frameworkcode ), + endpoint: "new_bib/frameworkcode=%s".format( + bib_info.frameworkcode + ), body: bib_info.record.toXML(), headers: { - "Content-Type": - "text/xml", + "Content-Type": "text/xml", }, }), update: bib_info => this.post({ - endpoint: "bib/%s?frameworkcode=%s".format( bib_info.id, bib_info.frameworkcode ), + endpoint: "bib/%s?frameworkcode=%s".format( + bib_info.id, + bib_info.frameworkcode + ), body: bib_info.record.toXML(), headers: { - "Content-Type": - "text/xml", + "Content-Type": "text/xml", }, }), }; } - } export default CataloguingAPIClient; -- 2.39.5