]> git.koha-community.org Git - koha.git/commit
Bug 32923: Fix x-koha-embed from EHoldings/*/*
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 14 Feb 2023 14:07:46 +0000 (15:07 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 27 Feb 2023 14:07:19 +0000 (11:07 -0300)
commit855e09163a4f92192756d1f783ab07cb8c00a972
tree5e9df57109c3b471599242791ba04c8870b434c8
parentb68a9a3596b093167927e8312e4245abff5f413e
Bug 32923: Fix x-koha-embed from EHoldings/*/*

We were validating twice the input and it broke the x-koha-embed header.
I don't really know what's happening, but here is how to recreate the
problem:
1. Edit Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm
2. Add the following lines in Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm, in the list method
    warn $c->req->headers->header('x-koha-embed');
3. curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/erm/eholdings/ebsco/packages --header "x-koha-embed: resources+count,vendor"

=> There is no vendor in the response
=> The warn displays "resources+count"

If you apply this patch you will notice that "vendor" is part of the
response and the warn displays "resources+count, vendor"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Packages/Local.pm
Koha/REST/V1/ERM/EHoldings/Resources/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Resources/Local.pm
Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm
Koha/REST/V1/ERM/EHoldings/Titles/Local.pm