]> git.koha-community.org Git - koha.git/commit
Bug 18729: (follow-up) Adjust API to new spec
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 14 Dec 2020 15:13:38 +0000 (12:13 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 25 Apr 2021 17:04:18 +0000 (17:04 +0000)
commit86906656abc6f74c46ae31359d5a083376347b3f
tree0960e3e6a206eeab06caa50c6bde7646989af500
parentc92a43b214f798f4f99ff0689ed9d2291bb593f6
Bug 18729: (follow-up) Adjust API to new spec

The previous patch introduces some behavioural changes to the API, as
well as the data types that need to be passed; all happens in the tests.

This patch adapts the route so it complies with those changes:
- JSON object containing pickup_library_id attribute is now passed back
  and forth.
- The controller should take care of checking the pickup location is
  valid, using the available tools.

To test:
1. Apply the patches, up to the tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> ERROR: Tests fail because the controller doesn't implement the
desired behavior
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60a253c983df1cf50193ee60df730e762ce8f504)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eaef2ce2076d1f72231457877b1bee9d1ab3234c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/REST/V1/Holds.pm
api/v1/swagger/paths/holds.json