Lines 177-182
sub add {
Link Here
|
177 |
my $patron_id = $params->{patron_id}; |
177 |
my $patron_id = $params->{patron_id}; |
178 |
my $onsite = $params->{onsite_checkout}; |
178 |
my $onsite = $params->{onsite_checkout}; |
179 |
|
179 |
|
|
|
180 |
if ( $c->stash('is_public') |
181 |
&& !C4::Context->preference('OpacTrustedCheckout') ) |
182 |
{ |
183 |
return $c->render( |
184 |
status => 400, |
185 |
openapi => { |
186 |
error => 'Feature disabled', |
187 |
error_code => 'FEATURE_DISABLED' |
188 |
} |
189 |
); |
190 |
} |
191 |
|
180 |
return try { |
192 |
return try { |
181 |
my $item = Koha::Items->find( $item_id ); |
193 |
my $item = Koha::Items->find( $item_id ); |
182 |
unless ($item) { |
194 |
unless ($item) { |
183 |
- |
|
|