@@ -, +, @@ warn $c->req->headers->header('x-koha-embed'); --- Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm | 6 +++--- Koha/REST/V1/ERM/EHoldings/Packages/Local.pm | 10 +++++----- Koha/REST/V1/ERM/EHoldings/Resources/EBSCO.pm | 6 +++--- Koha/REST/V1/ERM/EHoldings/Resources/Local.pm | 4 ++-- Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm | 4 ++-- Koha/REST/V1/ERM/EHoldings/Titles/Local.pm | 12 ++++++------ 6 files changed, 21 insertions(+), 21 deletions(-) --- a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm +++ a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm @@ -26,7 +26,7 @@ use Scalar::Util qw( blessed ); use Try::Tiny qw( catch try ); sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { @@ -87,7 +87,7 @@ sub list { } sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my ( $vendor_id, $package_id ) = split '-', @@ -119,7 +119,7 @@ sub get { } sub edit { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $body = $c->validation->param('body'); --- a/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm +++ a/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm @@ -33,7 +33,7 @@ use Try::Tiny qw( catch try ); =cut sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $packages_set = Koha::ERM::EHoldings::Packages->search( { 'me.external_id' => undef } ); @@ -50,7 +50,7 @@ sub list { =cut sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $package_id = $c->validation->param('package_id'); @@ -81,7 +81,7 @@ Controller function that handles adding a new Koha::ERM::EHoldings::Package obje =cut sub add { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { Koha::Database->new->schema->txn_do( @@ -147,7 +147,7 @@ Controller function that handles updating a Koha::ERM::EHoldings::Package object =cut sub update { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; my $package_id = $c->validation->param('package_id'); my $package = Koha::ERM::EHoldings::Packages->find( $package_id ); @@ -217,7 +217,7 @@ sub update { =cut sub delete { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; my $package = Koha::ERM::EHoldings::Packages->find( $c->validation->param('package_id') ); unless ($package) { --- a/Koha/REST/V1/ERM/EHoldings/Resources/EBSCO.pm +++ a/Koha/REST/V1/ERM/EHoldings/Resources/EBSCO.pm @@ -34,7 +34,7 @@ use Try::Tiny; =cut sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { @@ -121,7 +121,7 @@ sub list { =cut sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my ( $vendor_id, $package_id, $resource_id ) = split '-', @@ -177,7 +177,7 @@ sub get { =cut sub edit { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $body = $c->validation->param('body'); --- a/Koha/REST/V1/ERM/EHoldings/Resources/Local.pm +++ a/Koha/REST/V1/ERM/EHoldings/Resources/Local.pm @@ -33,7 +33,7 @@ use Try::Tiny qw( catch try ); =cut sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $package_id = $c->validation->param('package_id'); @@ -57,7 +57,7 @@ Controller function that handles retrieving a single Koha::ERM::EHoldings::Resou =cut sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $resource_id = $c->validation->param('resource_id'); --- a/Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm +++ a/Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm @@ -34,7 +34,7 @@ use Try::Tiny qw( catch try ); =cut sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { @@ -114,7 +114,7 @@ sub list { =cut sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $title_id = $c->validation->param('title_id'); --- a/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm +++ a/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm @@ -34,7 +34,7 @@ use Try::Tiny qw( catch try ); =cut sub list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $titles_set = Koha::ERM::EHoldings::Titles->new; @@ -54,7 +54,7 @@ Controller function that handles retrieving a single Koha::ERM::EHoldings::Title =cut sub get { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { my $title_id = $c->validation->param('title_id'); @@ -84,7 +84,7 @@ Controller function that handles adding a new Koha::ERM::EHoldings::Title object =cut sub add { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; return try { Koha::Database->new->schema->txn_do( @@ -150,7 +150,7 @@ Controller function that handles updating a Koha::ERM::EHoldings::Title object =cut sub update { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; my $title_id = $c->validation->param('title_id'); my $title = Koha::ERM::EHoldings::Titles->find( $title_id ); @@ -217,7 +217,7 @@ sub update { =cut sub delete { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; my $title = Koha::ERM::EHoldings::Titles->find( $c->validation->param('title_id') ); unless ($title) { @@ -244,7 +244,7 @@ sub delete { =cut sub import_from_list { - my $c = shift->openapi->valid_input or return; + my $c = shift or return; my $body = $c->validation->param('body'); my $list_id = $body->{list_id}; --