update
This commit is contained in:
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AuthGuard, AuthUpdateGuard, AuthenticatedGuard, AnonymousGuard } from './auth/auth.guard';
|
||||
import { HomeComponent, ImprintComponent, PrivacyPolicyComponent } from './pages/home/home.component';
|
||||
import { HomeComponent, ImprintComponent, PrivacyPolicyComponent, TermsOfServiceComponent } from './pages/home/home.component';
|
||||
import { HomeClubComponent } from './pages/home/club/home-club.component';
|
||||
import { HomeGeneralComponent } from './pages/home/general/home-general.component';
|
||||
import { HomePrivacyComponent } from './pages/home/privacy/home-privacy.component';
|
||||
@@ -18,13 +18,14 @@ import { RegisterComponent } from './pages/register/register.component';
|
||||
import { TokensComponent } from './pages/tokens/tokens.component';
|
||||
import { AppsComponent } from './pages/apps/apps.component';
|
||||
import { InfoComponent } from './pages/account/info/info.component';
|
||||
import { ProfileComponent } from './pages/account/profile/profile.component';
|
||||
import { VoucherComponent } from './pages/account/voucher/voucher.component';
|
||||
import { SecurityComponent } from './pages/account/security/security.component';
|
||||
import { UnavailableComponent } from './pages/unavailable/unavailable.component';
|
||||
import { NotfoundComponent } from './pages/notfound/notfound.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: "/general", pathMatch: 'full' },
|
||||
{ path: '', redirectTo: "/account", pathMatch: 'full' },
|
||||
{
|
||||
path: '', component: HomeComponent, canActivate: [AuthUpdateGuard], runGuardsAndResolvers: 'always', children: [
|
||||
{ path: 'general', component: HomeGeneralComponent, canActivate: [AuthUpdateGuard] },
|
||||
@@ -35,6 +36,7 @@ const routes: Routes = [
|
||||
},
|
||||
{ path: 'imprint', component: ImprintComponent, canActivate: [AuthUpdateGuard] },
|
||||
{ path: 'privacy-policy', component: PrivacyPolicyComponent, canActivate: [AuthUpdateGuard] },
|
||||
{ path: 'terms-of-service', component: TermsOfServiceComponent, canActivate: [AuthUpdateGuard] },
|
||||
{ path: 'login', component: LoginComponent, canActivate: [AnonymousGuard] },
|
||||
{ path: 'login/totp', component: LoginTotpComponent, canActivate: [AnonymousGuard] },
|
||||
{ path: 'external-login', component: FormLoginComponent, canActivate: [AnonymousGuard] },
|
||||
@@ -46,6 +48,7 @@ const routes: Routes = [
|
||||
path: 'account', component: AccountComponent, canActivate: [AuthenticatedGuard], children: [
|
||||
|
||||
{ path: 'info', component: InfoComponent, canActivate: [AuthenticatedGuard] },
|
||||
{ path: 'profile', component: ProfileComponent, canActivate: [AuthenticatedGuard] },
|
||||
{ path: 'voucher', component: VoucherComponent, canActivate: [AuthenticatedGuard] },
|
||||
{ path: 'security', component: SecurityComponent, canActivate: [AuthenticatedGuard] }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user