Lines 36-42
use Koha::REST::V1::ERM::EHoldings::Packages::EBSCO;
Link Here
|
36 |
sub list { |
36 |
sub list { |
37 |
my $c = shift->openapi->valid_input or return; |
37 |
my $c = shift->openapi->valid_input or return; |
38 |
|
38 |
|
39 |
my $provider = $c->validation->param('provider'); |
39 |
my $provider = $c->param('provider'); |
40 |
if ( $provider eq 'ebsco' ) { |
40 |
if ( $provider eq 'ebsco' ) { |
41 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::list($c); |
41 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::list($c); |
42 |
} else { |
42 |
} else { |
Lines 53-59
Controller function that handles retrieving a single Koha::ERM::EHoldings::Packa
Link Here
|
53 |
sub get { |
53 |
sub get { |
54 |
my $c = shift->openapi->valid_input or return; |
54 |
my $c = shift->openapi->valid_input or return; |
55 |
|
55 |
|
56 |
my $provider = $c->validation->param('provider'); |
56 |
my $provider = $c->param('provider'); |
57 |
if ( $provider eq 'ebsco' ) { |
57 |
if ( $provider eq 'ebsco' ) { |
58 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::get($c); |
58 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::get($c); |
59 |
} else { |
59 |
} else { |
Lines 70-76
Controller function that handles adding a new Koha::ERM::EHoldings::Package obje
Link Here
|
70 |
sub add { |
70 |
sub add { |
71 |
my $c = shift->openapi->valid_input or return; |
71 |
my $c = shift->openapi->valid_input or return; |
72 |
|
72 |
|
73 |
my $provider = $c->validation->param('provider'); |
73 |
my $provider = $c->param('provider'); |
74 |
if ( $provider && $provider eq 'ebsco' ) { |
74 |
if ( $provider && $provider eq 'ebsco' ) { |
75 |
die "invalid action"; |
75 |
die "invalid action"; |
76 |
} else { |
76 |
} else { |
Lines 87-93
Controller function that handles updating a Koha::ERM::EHoldings::Package object
Link Here
|
87 |
sub update { |
87 |
sub update { |
88 |
my $c = shift->openapi->valid_input or return; |
88 |
my $c = shift->openapi->valid_input or return; |
89 |
|
89 |
|
90 |
my $provider = $c->validation->param('provider'); |
90 |
my $provider = $c->param('provider'); |
91 |
if ( $provider && $provider eq 'ebsco' ) { |
91 |
if ( $provider && $provider eq 'ebsco' ) { |
92 |
die "invalid action"; |
92 |
die "invalid action"; |
93 |
} else { |
93 |
} else { |
Lines 102-108
sub update {
Link Here
|
102 |
sub delete { |
102 |
sub delete { |
103 |
my $c = shift->openapi->valid_input or return; |
103 |
my $c = shift->openapi->valid_input or return; |
104 |
|
104 |
|
105 |
my $provider = $c->validation->param('provider'); |
105 |
my $provider = $c->param('provider'); |
106 |
if ( $provider && $provider eq 'ebsco' ) { |
106 |
if ( $provider && $provider eq 'ebsco' ) { |
107 |
die "invalid action"; |
107 |
die "invalid action"; |
108 |
} else { |
108 |
} else { |
Lines 119-125
Controller function that handles editing a single Koha::ERM::EHoldings::Package
Link Here
|
119 |
sub edit { |
119 |
sub edit { |
120 |
my $c = shift->openapi->valid_input or return; |
120 |
my $c = shift->openapi->valid_input or return; |
121 |
|
121 |
|
122 |
my $provider = $c->validation->param('provider'); |
122 |
my $provider = $c->param('provider'); |
123 |
if ( $provider eq 'ebsco' ) { |
123 |
if ( $provider eq 'ebsco' ) { |
124 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::edit($c); |
124 |
return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::edit($c); |
125 |
} else { |
125 |
} else { |