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