[Koha-bugs] [Bug 32939] Have a generic fetch function for POST and PUT requests in vue modules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 15 12:57:27 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32939

--- Comment #20 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 146682
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146682&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list