]> git.koha-community.org Git - koha.git/commit
Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 20 Aug 2024 13:59:23 +0000 (10:59 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 29 Aug 2024 16:16:19 +0000 (18:16 +0200)
commit317456da49d68ee95a56adcc2316a2f62e1edf6a
tree7067d0d23394456a6cb98018eaf79789c399d513
parentddcf2b9b70763c2b5ab2e3477ecbff0cffee70fa
Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses

This patch refactors some small pieces of code to use the helpers as
prescribed on our coding guidelines [1] instead of manually crafting
responses.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/
=> SUCCESS: All tests pass
3. Sign off :-D

[1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST4:_Controller_code_.5BDRAFT.5D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
16 files changed:
Koha/REST/V1/Biblios/ItemGroups.pm
Koha/REST/V1/CashRegisters/Cashups.pm
Koha/REST/V1/DeletedBiblios.pm
Koha/REST/V1/Holds.pm
Koha/REST/V1/ILL/Backends.pm
Koha/REST/V1/Items.pm
Koha/REST/V1/Patrons/Checkouts.pm
Koha/REST/V1/Patrons/Recalls.pm
Koha/REST/V1/Preservation/Trains.pm
Koha/REST/V1/Static.pm
Koha/REST/V1/StockRotation/Rotas.pm
Koha/REST/V1/StockRotation/Stage.pm
Koha/REST/V1/TransferLimits.pm
t/db_dependent/api/v1/deleted_biblios.t
t/db_dependent/api/v1/preservation_Trains.t
t/db_dependent/api/v1/stockrotationstage.t