]> git.koha-community.org Git - koha.git/commit
Bug 23843: Add mapping to Koha::Library
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 21 Oct 2019 16:26:57 +0000 (13:26 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 23 Oct 2019 17:03:11 +0000 (18:03 +0100)
commit430be3e9f3e8ca2313a9b8487a34803edc3aaf2d
treeac000800e41f0b3de97fcfe8b5e3f51b172099b1
parent09ff41d9f12825d5dd042c12871a67300b6c535d
Bug 23843: Add mapping to Koha::Library

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Library.pm
Koha/REST/V1/Library.pm