View | Details | Raw Unified | Return to bug 33960
Collapse All | Expand All

(-)a/Koha/REST/V1/Biblios.pm (-1 / +2 lines)
Lines 803-809 sub list { Link Here
803
    push @prefetch, 'metadata'    # don't prefetch metadata if not needed
803
    push @prefetch, 'metadata'    # don't prefetch metadata if not needed
804
      unless $c->req->headers->accept =~ m/application\/json/;
804
      unless $c->req->headers->accept =~ m/application\/json/;
805
805
806
    my $deleted = delete $c->param->{deleted};
806
    my $deleted = $c->param('deleted');
807
    $c->req->params->remove('deleted');
807
808
808
    my $rs = $deleted ? Koha::Old::Biblios->search() : Koha::Biblios->search( undef, { prefetch => \@prefetch } );
809
    my $rs = $deleted ? Koha::Old::Biblios->search() : Koha::Biblios->search( undef, { prefetch => \@prefetch } );
809
    my $biblios = $c->objects->search_rs( $rs, [(sub{ $rs->api_query_fixer( $_[0], '', $_[1] ) })] );
810
    my $biblios = $c->objects->search_rs( $rs, [(sub{ $rs->api_query_fixer( $_[0], '', $_[1] ) })] );
(-)a/t/db_dependent/api/v1/biblios.t (-3 / +3 lines)
Lines 31-36 use t::lib::TestBuilder; Link Here
31
use Mojo::JSON qw(encode_json);
31
use Mojo::JSON qw(encode_json);
32
32
33
use C4::Auth;
33
use C4::Auth;
34
use C4::Biblio qw( DelBiblio );
34
use C4::Circulation qw( AddIssue AddReturn );
35
use C4::Circulation qw( AddIssue AddReturn );
35
36
36
use Koha::Biblios;
37
use Koha::Biblios;
Lines 1696-1703 subtest 'list() tests' => sub { Link Here
1696
          { Accept => 'text/plain' } )
1697
          { Accept => 'text/plain' } )
1697
      ->status_is(200);
1698
      ->status_is(200);
1698
1699
1699
    $biblio->delete;
1700
    DelBiblio( $biblio->id );
1700
    $biblio2->delete;
1701
    DelBiblio( $biblio2->id );
1701
1702
1702
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1703
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1703
          { Accept => 'application/json', 'x-koha-query' => $search } )
1704
          { Accept => 'application/json', 'x-koha-query' => $search } )
1704
- 

Return to bug 33960