diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.ts index 04716d81da5fe3467f593ece95ac089c42aa854d..b4644e9f226a7ab3795fcb678bafc7efc27ad2f0 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.ts @@ -1,6 +1,6 @@ -import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { Observable, Subscription } from 'rxjs'; +import { Observable } from 'rxjs'; import { ArchiveService } from '../archive.service'; import { Unit } from '../models/unit.interface'; @@ -9,7 +9,7 @@ import { Unit } from '../models/unit.interface'; templateUrl: './archive-preview.component.html', styleUrls: ['./archive-preview.component.scss'], }) -export class ArchivePreviewComponent implements OnInit, OnChanges, OnDestroy { +export class ArchivePreviewComponent implements OnInit, OnChanges { @Input() archiveUnit: Unit; @Input() @@ -19,7 +19,6 @@ export class ArchivePreviewComponent implements OnInit, OnChanges, OnDestroy { @Input() isPopup: boolean; - subscriptionDownloadProgress: Subscription; tenantIdentifier: number; uaPath$: Observable<{ fullPath: string; resumePath: string }>; fullPath = false; @@ -55,9 +54,4 @@ export class ArchivePreviewComponent implements OnInit, OnChanges, OnDestroy { showArchiveUniteFullPath() { this.fullPath = true; } - - ngOnDestroy() { - // unsubscribe to ensure no memory leaks - this.subscriptionDownloadProgress.unsubscribe(); - } } diff --git a/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts b/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts index 2b52a032e1155f50fa7a60b3e7320ddec421a392..4071822cc959a63021468c9223bd7bf9097f09b2 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts @@ -89,11 +89,6 @@ export class ArchiveApiService extends BaseHttpClient<any> { return `${this.apiUrl}/downloadobjectfromunit/${unitId}?tenantId=${tenantId}&contractId=${accessContractId}`; } - downloadObjectFromUnit(id: string, headers?: HttpHeaders): string { - console.log(headers); - return `${this.apiUrl}/downloadobjectfromunit/${id}`; - } - findArchiveUnit(id: string, headers?: HttpHeaders): Observable<any> { return this.http.get(`${this.apiUrl}/archiveunit/${id}`, { headers, responseType: 'text' }); }