diff --git a/apps/nest-backend/src/waiter/project-io/waiter-project-io.controller.ts b/apps/nest-backend/src/waiter/project-io/waiter-project-io.controller.ts index 4b3af57a..0c698b84 100644 --- a/apps/nest-backend/src/waiter/project-io/waiter-project-io.controller.ts +++ b/apps/nest-backend/src/waiter/project-io/waiter-project-io.controller.ts @@ -54,7 +54,7 @@ export class WaiterProjectIoController { try { Logger.log('called importProject'); Logger.log('file', file); - Logger.log('file', file.path); + Logger.log('file.path', file.path); const rootProjectPath = await this.configurationSerivce.getRootProjectPath(); await this.waiterProjectIoService.importProject( diff --git a/apps/ng-frontend/src/app/shared/components/project-import/project-import.component.ts b/apps/ng-frontend/src/app/shared/components/project-import/project-import.component.ts index 01814cad..a996c7e9 100644 --- a/apps/ng-frontend/src/app/shared/components/project-import/project-import.component.ts +++ b/apps/ng-frontend/src/app/shared/components/project-import/project-import.component.ts @@ -1,7 +1,7 @@ import { MatCardModule } from '@angular/material/card'; import { Component, OnDestroy, ViewEncapsulation } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; -import { catchError, Subject } from 'rxjs'; +import { catchError, Subject, Subscription } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; import { ProjectIoService } from '../../services/api/project-io/project-io.service'; @@ -37,7 +37,7 @@ export class ProjectImportComponent implements OnDestroy { const file: File | null = target.files?.[0] || null; if (file) { console.log('file', file); - this.projectIoService + return this.projectIoService .importProject(file) .pipe( catchError((err) => { @@ -50,11 +50,14 @@ export class ProjectImportComponent implements OnDestroy { if (event) { console.log('event', event); if (event.type === 1) { - this.router.navigate(['/']); + this.router.navigate(['/']).then(() => { + window.location.reload(); + }); } } }); } + return new Subscription(); } ngOnDestroy(): void {