Lines 46-61
Return the list of edifact files
Link Here
|
46 |
sub list { |
46 |
sub list { |
47 |
my $c = shift->openapi->valid_input or return; |
47 |
my $c = shift->openapi->valid_input or return; |
48 |
|
48 |
|
|
|
49 |
my $filter = { deleted => 0 }; |
49 |
return try { |
50 |
return try { |
50 |
|
51 |
|
51 |
my $files_rs = Koha::Edifact::Files->new; |
52 |
my $files_rs = Koha::Edifact::Files->search($filter); |
52 |
my $files = $c->objects->search($files_rs); |
53 |
my $files = $c->objects->search($files_rs); |
53 |
|
54 |
|
54 |
return $c->render( |
55 |
return $c->render( |
55 |
status => 200, |
56 |
status => 200, |
56 |
openapi => $files, |
57 |
openapi => $files, |
57 |
); |
58 |
); |
58 |
} catch { |
59 |
} |
|
|
60 |
catch { |
59 |
$c->unhandled_exception($_); |
61 |
$c->unhandled_exception($_); |
60 |
}; |
62 |
}; |
61 |
} |
63 |
} |