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

(-)a/Koha/REST/V1/DeletedBiblios.pm (-6 / +6 lines)
Lines 122-151 sub list { Link Here
122
122
123
    return try {
123
    return try {
124
124
125
        if ( $c->req->headers->accept =~ m/application\/json(;.*)?$/ ) {
125
        if ( $c->req->headers->accept =~ m/application\/json([;,].*)?$/ ) {
126
            $c->add_pagination_headers();
126
            return $c->render(
127
            return $c->render(
127
                status => 200,
128
                status => 200,
128
                json   => $c->objects->to_api($biblios),
129
                json   => $c->objects->to_api($biblios),
129
            );
130
            );
130
        } elsif ( $c->req->headers->accept =~ m/application\/marcxml\+xml(;.*)?$/ ) {
131
        } elsif ( $c->req->headers->accept =~ m/application\/marcxml\+xml([;,].*)?$/ ) {
131
            $c->res->headers->add( 'Content-Type', 'application/marcxml+xml' );
132
            $c->res->headers->add( 'Content-Type', 'application/marcxml+xml' );
132
            return $c->render(
133
            return $c->render(
133
                status => 200,
134
                status => 200,
134
                text   => $biblios->print_collection('marcxml')
135
                text   => $biblios->print_collection('marcxml')
135
            );
136
            );
136
        } elsif ( $c->req->headers->accept =~ m/application\/marc-in-json(;.*)?$/ ) {
137
        } elsif ( $c->req->headers->accept =~ m/application\/marc-in-json([;,].*)?$/ ) {
137
            $c->res->headers->add( 'Content-Type', 'application/marc-in-json' );
138
            $c->res->headers->add( 'Content-Type', 'application/marc-in-json' );
138
            return $c->render(
139
            return $c->render(
139
                status => 200,
140
                status => 200,
140
                data   => $biblios->print_collection('mij')
141
                data   => $biblios->print_collection('mij')
141
            );
142
            );
142
        } elsif ( $c->req->headers->accept =~ m/application\/marc(;.*)?$/ ) {
143
        } elsif ( $c->req->headers->accept =~ m/application\/marc([;,].*)?$/ ) {
143
            $c->res->headers->add( 'Content-Type', 'application/marc' );
144
            $c->res->headers->add( 'Content-Type', 'application/marc' );
144
            return $c->render(
145
            return $c->render(
145
                status => 200,
146
                status => 200,
146
                text   => $biblios->print_collection('marc')
147
                text   => $biblios->print_collection('marc')
147
            );
148
            );
148
        } elsif ( $c->req->headers->accept =~ m/text\/plain(;.*)?$/ ) {
149
        } elsif ( $c->req->headers->accept =~ m/text\/plain([;,].*)?$/ ) {
149
            return $c->render(
150
            return $c->render(
150
                status => 200,
151
                status => 200,
151
                text   => $biblios->print_collection('txt')
152
                text   => $biblios->print_collection('txt')
152
- 

Return to bug 17387