]> git.koha-community.org Git - koha.git/commit
Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts
authorAlex Arnaud <alex.arnaud@biblibre.com>
Wed, 10 Apr 2024 12:03:14 +0000 (14:03 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 24 May 2024 08:55:11 +0000 (10:55 +0200)
commitd2e333520897234987a736539c1c3e208d910b1b
treea2e40211edede764047e9240275f658e7b5c4fb3
parentc2f66eb757f788ed73684f8ff04c8ae8352b22d3
Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts

This patch adds a new endpoint, for fetching checkouts from a specific
patron.

Test plan:

1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/patrons_checkouts.t
=> SUCCESS: Tests pass!
3. Run:
   $ curl -v -s -u koha:koha --request GET \
        http://kohadev.local/api/v1/patrons/{id}/checkouts
test with query parameters (they are the same as for /patrons/{id}/holds
=> SUCCESS: The API works!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 914afffd56b861727aff1309abc54b2950bdca0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/REST/V1/Patrons/Checkouts.pm [new file with mode: 0644]
api/v1/swagger/paths/patrons_checkouts.yaml [new file with mode: 0644]
api/v1/swagger/swagger.yaml
t/db_dependent/api/v1/patrons_checkouts.t [new file with mode: 0755]