[Koha-bugs] [Bug 31795] REST API: POST endpoint for Authorities

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 10 19:36:17 CEST 2023


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

--- Comment #11 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 149407
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149407&action=edit
Bug 31795: (QA follow-up) Use x-koha-override header

Despite its title, this patch does a couple more things.

1. The tests are rewritten to cover more things, and also to avoid
   deleting all authorities inside the transaction. It is really not
   required.
2. It makes the endpoint rely on the already generically implemented
   x-koha-override header, which is intended for the same use case as
   x-confirm-not-duplicate is for.
3. It changes the return codes to match the coding guidelines [1]
4. Only checks for duplicates if no override passed.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/authorities.t
=> SUCCESS: Tests pass!
2. Apply this follow-up
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

[1]
https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#SWAGGER3.2.1_POST

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

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


More information about the Koha-bugs mailing list