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

(-)a/Koha/REST/V1/Biblios.pm (-1 / +6 lines)
Lines 20-25 use Modern::Perl; Link Here
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Koha::Biblios;
22
use Koha::Biblios;
23
use Koha::Old::Biblios;
23
use Koha::DateUtils;
24
use Koha::DateUtils;
24
use Koha::Ratings;
25
use Koha::Ratings;
25
use Koha::RecordProcessor;
26
use Koha::RecordProcessor;
Lines 797-808 Controller function that handles retrieving a single biblio object Link Here
797
sub list {
798
sub list {
798
    my $c = shift->openapi->valid_input or return;
799
    my $c = shift->openapi->valid_input or return;
799
800
801
    my $deleted = delete $c->validation->output->{deleted};
802
800
    my $attributes;
803
    my $attributes;
801
    $attributes =
804
    $attributes =
802
      { prefetch => ['metadata'] }    # don't prefetch metadata if not needed
805
      { prefetch => ['metadata'] }    # don't prefetch metadata if not needed
803
      unless $c->req->headers->accept =~ m/application\/json/;
806
      unless $c->req->headers->accept =~ m/application\/json/;
804
807
805
    my $biblios = $c->objects->search_rs( Koha::Biblios->new );
808
    my $biblios = $deleted ?
809
        $c->objects->search_rs( Koha::Old::Biblios->new ) :
810
        $c->objects->search_rs( Koha::Biblios->new );
806
811
807
    return try {
812
    return try {
808
813
(-)a/api/v1/swagger/paths/biblios.yaml (-1 / +4 lines)
Lines 67-72 Link Here
67
      - biblios
67
      - biblios
68
    summary: List biblios
68
    summary: List biblios
69
    parameters:
69
    parameters:
70
      - name: deleted
71
        in: query
72
        description: If information on deleted objects is requested
73
        type: boolean
70
      - $ref: "../swagger.yaml#/parameters/page"
74
      - $ref: "../swagger.yaml#/parameters/page"
71
      - $ref: "../swagger.yaml#/parameters/per_page"
75
      - $ref: "../swagger.yaml#/parameters/per_page"
72
      - $ref: "../swagger.yaml#/parameters/match"
76
      - $ref: "../swagger.yaml#/parameters/match"
73
- 

Return to bug 33960