]> 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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 26 Apr 2024 18:15:49 +0000 (20:15 +0200)
commit914afffd56b861727aff1309abc54b2950bdca0b
tree80d077ee1101c124d0ded0ac163aed4192836ce5
parent5df4c0d34b0029b96c6e5937ac2d1966fc967577
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>
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]