From abd661656a4d3308aca3aa5ed4a5f6a408322502 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 10 Jan 2020 16:47:44 -0500 Subject: [PATCH] LP1852782 Angular MARC record update API repairs Use the correct API when updating authority records. Also use the correct bib record update API per LP 1859191. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts index 157ff0abc4..0bc308a6cc 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts @@ -220,7 +220,9 @@ export class MarcEditorComponent implements OnInit { } modifyRecord(marcXml: string, sourceName: string, sourceId: number): Promise { - const method = 'open-ils.cat.biblio.record.marc.replace'; + const method = this.recordType === 'biblio' ? + 'open-ils.cat.biblio.record.xml.update' : + 'open-ils.cat.authority.record.overlay'; return this.net.request('open-ils.cat', method, this.auth.token(), this.record.id, marcXml, sourceName @@ -235,7 +237,8 @@ export class MarcEditorComponent implements OnInit { return null; } - return response.marc(); + // authority.record.overlay resturns a '1' on success. + return typeof response === 'object' ? response.marc() : marcXml; }); } -- 2.11.0