Bug 36495: Add render_resource_not_found() and render_resource_deleted() helpers
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 2 Apr 2024 18:18:16 +0000 (15:18 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 26 Apr 2024 16:06:13 +0000 (18:06 +0200)
commitfc7b6d9eb56436417280809fa06467c367615291
tree8bfabd1f5f8bbca71159c9c9c4a54fc8e78c9a2c
parent39879cd5cf1d46ee57e5ab22e1770c9d5c98b6ae
Bug 36495: Add render_resource_not_found() and render_resource_deleted() helpers

This patch introduces two helpers to be used in controllers.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/REST/Plugin/Responses.pm [new file with mode: 0644]
Koha/REST/V1.pm
t/db_dependent/api/v1/responses.t [new file with mode: 0755]