Lines 798-813
Controller function that handles retrieving a single biblio object
Link Here
|
798 |
sub list { |
798 |
sub list { |
799 |
my $c = shift->openapi->valid_input or return; |
799 |
my $c = shift->openapi->valid_input or return; |
800 |
|
800 |
|
801 |
my $deleted = delete $c->validation->output->{deleted}; |
801 |
my $deleted = $c->param('deleted'); |
|
|
802 |
$c->req->params->remove('deleted'); |
802 |
|
803 |
|
803 |
my $attributes; |
804 |
my $attributes; |
804 |
$attributes = |
805 |
$attributes = |
805 |
{ prefetch => ['metadata'] } # don't prefetch metadata if not needed |
806 |
{ prefetch => ['metadata'] } # don't prefetch metadata if not needed |
806 |
unless $c->req->headers->accept =~ m/application\/json/; |
807 |
unless $c->req->headers->accept =~ m/application\/json/; |
807 |
|
808 |
|
808 |
my $biblios = $deleted ? |
809 |
my $biblios = |
809 |
$c->objects->search_rs( Koha::Old::Biblios->new ) : |
810 |
$deleted |
810 |
$c->objects->search_rs( Koha::Biblios->new ); |
811 |
? $c->objects->search_rs( Koha::Old::Biblios->new ) |
|
|
812 |
: $c->objects->search_rs( Koha::Biblios->new ); |
811 |
|
813 |
|
812 |
return try { |
814 |
return try { |
813 |
|
815 |
|