From 6759700167ddcd3e0abe8ac3fd40a2218d56e6ae Mon Sep 17 00:00:00 2001
From: Benaissa BENARBIA <ben.benarbia@gmail.com>
Date: Fri, 3 Dec 2021 10:58:18 +0100
Subject: [PATCH] fix reviews

---
 .../archive-preview/archive-preview.component.ts     | 12 +++---------
 .../src/app/core/api/archive-api.service.ts          |  5 -----
 2 files changed, 3 insertions(+), 14 deletions(-)

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 04716d81d..b4644e9f2 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 2b52a032e..4071822cc 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' });
   }
-- 
GitLab