diff --git a/package-lock.json b/package-lock.json index a6da198..bd84348 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "ngx-markdown": "^12.0.1", "protractor": "^7.0.0", "rxjs": "^6.5.3", - "sartography-workflow-lib": "0.0.589", + "sartography-workflow-lib": "0.0.590", "tslib": "^2.3.0", "uuid": "^8.3.2", "zone.js": "~0.11.4" @@ -16865,9 +16865,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sartography-workflow-lib": { - "version": "0.0.589", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.589.tgz", - "integrity": "sha512-0riSQhmP2HK96Vz+lnvtiEVI/ofBXUg3eopmH0ZkwaLHc8VGMfqdtOGE/5sfFPWsHiggXtJxlSm/3IA8vJvI8Q==", + "version": "0.0.590", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.590.tgz", + "integrity": "sha512-ezwqapFq4xaVO3OwQc39uDi4LOVSIcr4aYGuTQ6Ke+CmLFHQcPGFiVMPwLrDn9FPokzFTXNDQd1YlkkHjFEUgg==", "dependencies": { "tslib": "^2.2.0" } @@ -33368,9 +33368,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sartography-workflow-lib": { - "version": "0.0.589", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.589.tgz", - "integrity": "sha512-0riSQhmP2HK96Vz+lnvtiEVI/ofBXUg3eopmH0ZkwaLHc8VGMfqdtOGE/5sfFPWsHiggXtJxlSm/3IA8vJvI8Q==", + "version": "0.0.590", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.590.tgz", + "integrity": "sha512-ezwqapFq4xaVO3OwQc39uDi4LOVSIcr4aYGuTQ6Ke+CmLFHQcPGFiVMPwLrDn9FPokzFTXNDQd1YlkkHjFEUgg==", "requires": { "tslib": "^2.2.0" } diff --git a/package.json b/package.json index b20eadc..91ce4da 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "ngx-markdown": "^12.0.1", "protractor": "^7.0.0", "rxjs": "^6.5.3", - "sartography-workflow-lib": "0.0.589", + "sartography-workflow-lib": "0.0.590", "tslib": "^2.3.0", "uuid": "^8.3.2", "zone.js": "~0.11.4" diff --git a/src/app/reference-files/reference-files.component.spec.ts b/src/app/reference-files/reference-files.component.spec.ts index 20d7cc2..eab936a 100644 --- a/src/app/reference-files/reference-files.component.spec.ts +++ b/src/app/reference-files/reference-files.component.spec.ts @@ -111,7 +111,7 @@ describe('ReferenceFilesComponent', () => { component.openFileDialog(mockFileMetaReference0); - const fReq = httpMock.expectOne(`apiRoot/reference_file/${mockDocMeta.name}`); + const fReq = httpMock.expectOne(`apiRoot/reference_file/${mockDocMeta.name}/data`); expect(fReq.request.method).toEqual('GET'); fReq.flush(mockArrayBuffer, {headers: mockHeaders}); @@ -128,7 +128,7 @@ describe('ReferenceFilesComponent', () => { component.downloadFile(mockDocMeta); - const fReq = httpMock.expectOne(`apiRoot/reference_file/${mockDocMeta.name}`); + const fReq = httpMock.expectOne(`apiRoot/reference_file/${mockDocMeta.name}/data`); expect(fReq.request.method).toEqual('GET'); fReq.flush(mockArrayBuffer, {headers: mockHeaders}); diff --git a/src/app/reference-files/reference-files.component.ts b/src/app/reference-files/reference-files.component.ts index 2c16513..66e15f7 100644 --- a/src/app/reference-files/reference-files.component.ts +++ b/src/app/reference-files/reference-files.component.ts @@ -27,7 +27,7 @@ export class ReferenceFilesComponent { } openFileDialog(fm: FileMeta) { - this.apiService.getReferenceFile(fm.name).subscribe(oldFile => { + this.apiService.getReferenceFileData(fm.name).subscribe(oldFile => { const dialogData: OpenFileDialogData = { fileMetaId: fm.id, file: new File([oldFile.body], fm.name, { @@ -51,7 +51,7 @@ export class ReferenceFilesComponent { } downloadFile(fm: FileMeta) { - this.apiService.getReferenceFile(fm.name).subscribe(response => { + this.apiService.getReferenceFileData(fm.name).subscribe(response => { const blob = new Blob([response.body], {type: fm.content_type}); fileSaver.saveAs(blob, fm.name); });