return try {
unless ($item_id or $barcode){
unless ( $item_id or $barcode ) {
return $c->render(
status => 400,
openapi => {
}
my $item;
if ($item_id){
if ($item_id) {
$item = Koha::Items->find($item_id);
if ($barcode){
if ($barcode) {
$item = Koha::Items->find({ barcode => $barcode });
$item = Koha::Items->find( { barcode => $barcode } );
unless ($item) {
$t->post_ok( "//$userid:$password@/api/v1/checkouts" => json => { item_id => $item1_id, patron_id => $patron_id } )
->status_is(201);
$t->post_ok( "//$userid:$password@/api/v1/checkouts" => json => { external_id => $item1_barcode, patron_id => $patron_id } )
$t->post_ok(
"//$userid:$password@/api/v1/checkouts" => json => { external_id => $item1_barcode, patron_id => $patron_id } )
-