]> git.koha-community.org Git - koha.git/commit
Bug 32939: Uniformize api calls
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 15 Feb 2023 10:38:08 +0000 (11:38 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 27 Feb 2023 14:13:10 +0000 (11:13 -0300)
commit545e568b9f243d3347ee7770f752e23d0af851ac
tree0e03752f9b0cfd7602f6259fbf63b2a8408a24a9
parent225f2c664b9549e05a9c98a4fd91df08bcc55c65
Bug 32939: Uniformize api calls

We want to make the call easier and without less errors possible.
Here, no need to async keyword, try-catch, etc.
Only call the method and use the common then with the 2 success and
error Promise arguments.

We will certainly want to add later a parameter to prevent the display
of the error in fetchJSON, in case the failure does not require a message
for the end user.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormConfirmDelete.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js