diff --git a/Koha/REST/V1/DeletedBiblios.pm b/Koha/REST/V1/DeletedBiblios.pm index 8ba90026c0..73af99740b 100644 --- a/Koha/REST/V1/DeletedBiblios.pm +++ b/Koha/REST/V1/DeletedBiblios.pm @@ -59,7 +59,7 @@ sub get { if ( $c->req->headers->accept =~ m/application\/json/ ) { return $c->render( status => 200, - json => $biblio->to_api + json => $c->objects->to_api($biblio), ); } else { my $metadata = $biblio->metadata; diff --git a/api/v1/swagger/paths/deleted_biblios.yaml b/api/v1/swagger/paths/deleted_biblios.yaml index cf290da778..22fe8f8e19 100644 --- a/api/v1/swagger/paths/deleted_biblios.yaml +++ b/api/v1/swagger/paths/deleted_biblios.yaml @@ -81,6 +81,16 @@ summary: Get deleted biblio parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - items + collectionFormat: csv produces: - application/json - application/marcxml+xml diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore-records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore-records.tt index 607d05415f..baceb567d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore-records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore-records.tt @@ -576,6 +576,7 @@ url: "/api/v1/deleted/biblios/" + biblio_id, type: "GET", headers: { + "Accept": "application/json", "x-koha-embed": "items", }, success: function (biblio) {