Lines 193-198
sub add {
Link Here
|
193 |
my $patron_id = $body->{patron_id}; |
193 |
my $patron_id = $body->{patron_id}; |
194 |
my $onsite = $body->{onsite_checkout}; |
194 |
my $onsite = $body->{onsite_checkout}; |
195 |
|
195 |
|
|
|
196 |
if ( $c->stash('is_public') |
197 |
&& !C4::Context->preference('OpacTrustedCheckout') ) |
198 |
{ |
199 |
return $c->render( |
200 |
status => 405, |
201 |
openapi => { |
202 |
error => 'Feature disabled', |
203 |
error_code => 'FEATURE_DISABLED' |
204 |
} |
205 |
); |
206 |
} |
207 |
|
196 |
return try { |
208 |
return try { |
197 |
my $item = Koha::Items->find($item_id); |
209 |
my $item = Koha::Items->find($item_id); |
198 |
unless ($item) { |
210 |
unless ($item) { |