2017-06-16 07:32:15 -05:00
|
|
|
import { NgModule } from '@angular/core'
|
|
|
|
import { RouterModule, Routes } from '@angular/router'
|
2018-01-17 03:32:03 -06:00
|
|
|
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'
|
|
|
|
|
2017-06-16 07:32:15 -05:00
|
|
|
import { AdminComponent } from './admin.component'
|
2017-11-15 03:10:41 -06:00
|
|
|
import { FollowsRoutes } from './follows'
|
2017-06-16 07:32:15 -05:00
|
|
|
import { UsersRoutes } from './users'
|
2018-08-14 09:38:37 -05:00
|
|
|
import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
|
2019-04-11 03:05:43 -05:00
|
|
|
import { SystemRoutes } from '@app/+admin/system'
|
2019-07-10 11:30:27 -05:00
|
|
|
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,
|
2017-10-27 09:55:03 -05:00
|
|
|
canActivate: [ MetaGuard ],
|
|
|
|
canActivateChild: [ MetaGuard ],
|
2016-08-09 14:45:21 -05:00
|
|
|
children: [
|
2016-08-21 03:41:21 -05:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: 'users',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
2017-11-15 03:10:41 -06:00
|
|
|
...FollowsRoutes,
|
2017-01-23 15:16:48 -06:00
|
|
|
...UsersRoutes,
|
2018-08-14 09:38:37 -05:00
|
|
|
...ModerationRoutes,
|
2019-04-11 03:05:43 -05:00
|
|
|
...SystemRoutes,
|
2019-07-10 11:30:27 -05:00
|
|
|
...ConfigRoutes,
|
|
|
|
...PluginsRoutes
|
2016-08-09 14:45:21 -05:00
|
|
|
]
|
|
|
|
}
|
2017-06-16 07:32:15 -05:00
|
|
|
]
|
2016-11-20 10:18:15 -06:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [ RouterModule.forChild(adminRoutes) ],
|
|
|
|
exports: [ RouterModule ]
|
|
|
|
})
|
|
|
|
export class AdminRoutingModule {}
|