PeerTube/client/src/app/+admin/admin-routing.module.ts

41 lines
1.0 KiB
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { ConfigRoutes } from '@app/+admin/config'
2016-08-09 14:45:21 -05:00
2017-07-06 10:43:58 -05:00
import { MetaGuard } from '@ngx-meta/core'
import { AdminComponent } from './admin.component'
import { FollowsRoutes } from './follows'
import { UsersRoutes } from './users'
import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
2019-04-11 03:05:43 -05:00
import { SystemRoutes } from '@app/+admin/system'
import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes'
2016-08-09 14:45:21 -05:00
2016-11-20 10:18:15 -06:00
const adminRoutes: Routes = [
2016-08-09 14:45:21 -05:00
{
2017-01-23 15:32:43 -06:00
path: '',
2016-08-09 14:45:21 -05:00
component: AdminComponent,
canActivate: [ MetaGuard ],
canActivateChild: [ MetaGuard ],
2016-08-09 14:45:21 -05:00
children: [
{
path: '',
redirectTo: 'users',
pathMatch: 'full'
},
...FollowsRoutes,
...UsersRoutes,
...ModerationRoutes,
2019-04-11 03:05:43 -05:00
...SystemRoutes,
...ConfigRoutes,
...PluginsRoutes
2016-08-09 14:45:21 -05:00
]
}
]
2016-11-20 10:18:15 -06:00
@NgModule({
imports: [ RouterModule.forChild(adminRoutes) ],
exports: [ RouterModule ]
})
export class AdminRoutingModule {}