diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts index da77b8c46..abbcf9ee3 100644 --- a/dmp-frontend/src/app/app-routing.module.ts +++ b/dmp-frontend/src/app/app-routing.module.ts @@ -11,10 +11,10 @@ import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component const appRoutes: Routes = [ { path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] }, - { path: 'login-page', component: MainSignInComponent}, + { path: 'login', component: MainSignInComponent}, { path: 'projects', component: ProjectsComponent}, { path: 'dmps', component: DmpComponent}, - { path: '', redirectTo: '/login-page', pathMatch: 'full' }, + { path: '', redirectTo: '/login', pathMatch: 'full' }, { path: '**', component: PageNotFoundComponent }, { path: '', diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index 8472a4f8d..ac2fca9df 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -29,12 +29,12 @@ export class AppComponent { login(){ //redirect to login page - this.router.navigate(['/login-page'], { queryParams: { /*returnUrl: this.state.url*/ }}); + this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }}); } logout(){ this.tokenService.logout(); - this.router.navigate(['/login-page'], { queryParams: { /*returnUrl: this.state.url*/ }}); + this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }}); } diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts index 4345ea4db..50c21d18d 100644 --- a/dmp-frontend/src/app/app.module.ts +++ b/dmp-frontend/src/app/app.module.ts @@ -18,7 +18,6 @@ import { TokenService, TokenProvider } from './services/login/token.service'; import { LocalStorageService } from 'ngx-webstorage'; import { dataModelBuilder } from './services/dataModelBuilder.service'; import { DynamicFormGroupComponent } from './form/dynamic-form-group/dynamic-form-group.component'; -//import { LoginComponent } from './login/login-page'; import { AppRoutingModule } from './app-routing.module'; import { AuthGuard } from './guards/auth.guard'; import { PageNotFoundComponent } from './not-found.component'; diff --git a/dmp-frontend/src/app/guards/auth.guard.ts b/dmp-frontend/src/app/guards/auth.guard.ts index 069689145..d06af87d9 100644 --- a/dmp-frontend/src/app/guards/auth.guard.ts +++ b/dmp-frontend/src/app/guards/auth.guard.ts @@ -13,7 +13,7 @@ export class AuthGuard implements CanActivate { return true; } // not logged in so redirect to login page with the return url - this.router.navigate(['/login-page'], { queryParams: { returnUrl: state.url }}); + this.router.navigate(['/login'], { queryParams: { returnUrl: state.url }}); return false; } diff --git a/dmp-frontend/src/app/services/interceptor.ts b/dmp-frontend/src/app/services/interceptor.ts index 79605bb69..a8d54b57d 100644 --- a/dmp-frontend/src/app/services/interceptor.ts +++ b/dmp-frontend/src/app/services/interceptor.ts @@ -21,7 +21,7 @@ export class GlobalInterceptor implements HttpInterceptor { if (err instanceof HttpErrorResponse) { if (err.status === 401) { this.tokenService.logout(); - this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }}); + this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }}); } } }); diff --git a/dmp-frontend/src/app/services/server.service.ts b/dmp-frontend/src/app/services/server.service.ts index 4366e49e4..2d05a69b7 100644 --- a/dmp-frontend/src/app/services/server.service.ts +++ b/dmp-frontend/src/app/services/server.service.ts @@ -6,7 +6,6 @@ import {dataModelBuilder} from '../../app/services/dataModelBuilder.service'; import { DatasetProfile } from '../entities/datasetprofile'; import {DataModel} from '../entities/DataModel'; import {Project} from '../entities/model/project'; -//import {LoginComponent} from '../../app/login/login-page'; import { TokenService, TokenProvider } from './login/token.service'; import {RestBase} from './rest-base'; import 'rxjs/Rx';