2017-06-16 12:32:15 +00:00
|
|
|
import { NgModule } from '@angular/core'
|
|
|
|
import { RouterModule, Routes } from '@angular/router'
|
2016-08-09 19:45:21 +00:00
|
|
|
|
2017-07-06 15:43:58 +00:00
|
|
|
import { MetaGuard } from '@ngx-meta/core'
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
import { AdminComponent } from './admin.component'
|
|
|
|
import { FriendsRoutes } from './friends'
|
2017-06-25 15:19:46 +00:00
|
|
|
import { RequestSchedulersRoutes } from './request-schedulers'
|
2017-06-16 12:32:15 +00:00
|
|
|
import { UsersRoutes } from './users'
|
|
|
|
import { VideoAbusesRoutes } from './video-abuses'
|
2017-09-10 07:24:50 +00:00
|
|
|
import { AdminGuard } from './admin-guard.service'
|
2017-09-22 07:13:43 +00:00
|
|
|
import { BlacklistRoutes } from './blacklist'
|
2016-08-09 19:45:21 +00:00
|
|
|
|
2016-11-20 16:18:15 +00:00
|
|
|
const adminRoutes: Routes = [
|
2016-08-09 19:45:21 +00:00
|
|
|
{
|
2017-01-23 21:32:43 +00:00
|
|
|
path: '',
|
2016-08-09 19:45:21 +00:00
|
|
|
component: AdminComponent,
|
2017-09-10 07:24:50 +00:00
|
|
|
canActivate: [ MetaGuard, AdminGuard ],
|
|
|
|
canActivateChild: [ MetaGuard, AdminGuard ],
|
2016-08-09 19:45:21 +00:00
|
|
|
children: [
|
2016-08-21 08:41:21 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: 'users',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
2016-08-12 16:22:58 +00:00
|
|
|
...FriendsRoutes,
|
2017-06-25 15:19:46 +00:00
|
|
|
...RequestSchedulersRoutes,
|
2017-01-23 21:16:48 +00:00
|
|
|
...UsersRoutes,
|
2017-09-22 07:13:43 +00:00
|
|
|
...VideoAbusesRoutes,
|
|
|
|
...BlacklistRoutes
|
2016-08-09 19:45:21 +00:00
|
|
|
]
|
|
|
|
}
|
2017-06-16 12:32:15 +00:00
|
|
|
]
|
2016-11-20 16:18:15 +00:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [ RouterModule.forChild(adminRoutes) ],
|
|
|
|
exports: [ RouterModule ]
|
|
|
|
})
|
|
|
|
export class AdminRoutingModule {}
|