From 78b60f98e7e57d2b9cb75717c9f56b0ecdeb429b Mon Sep 17 00:00:00 2001
From: mechtelm <nicht@mehr.fragen>
Date: Thu, 16 Apr 2020 08:26:26 +0200
Subject: [PATCH] commit just before major refactoring due to major api
 refactoring

---
 src/app/app.component.ts                         | 1 -
 src/app/app.interceptor.ts                       | 6 +++---
 src/app/maindata.service.ts                      | 1 +
 src/app/workspace-admin/files/files.component.ts | 2 ++
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index e10d4c00..4127b93c 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -48,7 +48,6 @@ export class AppComponent implements OnInit, OnDestroy {
 
       this.appErrorSubscription = this.mds.appError$.subscribe(err => {
         if (err) {
-          console.warn(err.description);
           this.showError = true;
         }
       });
diff --git a/src/app/app.interceptor.ts b/src/app/app.interceptor.ts
index c1f4e756..f49bc789 100644
--- a/src/app/app.interceptor.ts
+++ b/src/app/app.interceptor.ts
@@ -35,18 +35,18 @@ export class AuthInterceptor implements HttpInterceptor {
     return next.handle(requestA).pipe(
       tap(requ => {
           // filter out OPTIONS request
-          if (requ.type > 0) {
+          if (requ.type > 0) { // TODO check the way to detect OPTION
             this.mds.decrementDelayedProcessesCount();
+            console.log('äöüsl');
           }
       }),
       catchError(e => {
         this.mds.decrementDelayedProcessesCount();
-        console.log('err dec');
         if (e instanceof HttpErrorResponse) {
           const httpError = e as HttpErrorResponse;
           if (httpError.error instanceof ErrorEvent) {
             this.mds.appError$.next({
-              label: 'Fehler in der Netzwerk-Verbindung',
+              label: 'Fehler in der Netzwerkverbindung',
               description: httpError.message,
               category: "PROBLEM"
             })
diff --git a/src/app/maindata.service.ts b/src/app/maindata.service.ts
index d46841f8..5367f7ea 100644
--- a/src/app/maindata.service.ts
+++ b/src/app/maindata.service.ts
@@ -35,6 +35,7 @@ export class MainDataService {
   public globalErrorMsg$ = new BehaviorSubject<ServerError>(null); // TODO remove globalErrorMsg$
   public appError$ = new BehaviorSubject<AppError>(null);
   public delayedProcessesCount$ = new BehaviorSubject<number>(0);
+  public apiVersionProblem = false;
 
   // set by app.component.ts
   public postMessage$ = new Subject<MessageEvent>();
diff --git a/src/app/workspace-admin/files/files.component.ts b/src/app/workspace-admin/files/files.component.ts
index 6bda7313..b278f5c9 100644
--- a/src/app/workspace-admin/files/files.component.ts
+++ b/src/app/workspace-admin/files/files.component.ts
@@ -135,9 +135,11 @@ export class FilesComponent implements OnInit {
     } else {
       this.bs.getFiles().subscribe(
         (filedataresponse: GetFileResponseData[]) => {
+          console.log('updateFileList ok');
           this.serverfiles = new MatTableDataSource(filedataresponse);
           this.serverfiles.sort = this.sort;
         }, (err: ServerError) => {
+          console.log('updateFileList err');
           this.mds.appError$.next({
             label: err.labelNice,
             description: err.labelSystem,
-- 
GitLab