Lines 40-54
sub list {
Link Here
|
40 |
|
40 |
|
41 |
my $config = Koha::Illrequest::Config->new; |
41 |
my $config = Koha::Illrequest::Config->new; |
42 |
my $backends = $config->available_backends; |
42 |
my $backends = $config->available_backends; |
|
|
43 |
my $backend_module = Koha::Illbackend->new; |
43 |
|
44 |
|
44 |
my @data; |
45 |
my @data; |
45 |
foreach my $b (@$backends) { |
46 |
foreach my $b (@$backends) { |
46 |
my $backend = Koha::Illrequest->new->load_backend($b); |
47 |
my $backend = Koha::Illrequest->new->load_backend($b); |
47 |
push @data, |
48 |
|
48 |
{ |
49 |
my $embed = $backend_module->embed( |
|
|
50 |
$b, |
51 |
$c->req->headers->header('x-koha-embed') |
52 |
); |
53 |
|
54 |
my $return = { |
49 |
ill_backend_id => $b, |
55 |
ill_backend_id => $b, |
50 |
capabilities => $backend->capabilities, |
56 |
capabilities => $backend->capabilities, |
51 |
}; |
57 |
}; |
|
|
58 |
push @data, $embed ? { %$return, %$embed } : $return; |
52 |
} |
59 |
} |
53 |
return $c->render( status => 200, openapi => \@data ); |
60 |
return $c->render( status => 200, openapi => \@data ); |
54 |
} |
61 |
} |