import { Routes } from '@angular/router'
-import { UserRight } from '../../../../../shared'
-import { UserRightGuard } from '@app/core'
-import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
-import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list'
-import { VideoAutoBlacklistListComponent } from '@app/+admin/moderation/video-auto-blacklist-list'
-import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
+import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
+import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
+import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
+import { UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
export const ModerationRoutes: Routes = [
{
children: [
{
path: '',
- redirectTo: 'video-abuses/list',
+ redirectTo: 'abuses/list',
pathMatch: 'full'
},
{
path: 'video-abuses',
- redirectTo: 'video-abuses/list',
- pathMatch: 'full'
- },
- {
- path: 'video-blacklist',
- redirectTo: 'video-blacklist/list',
+ redirectTo: 'abuses/list',
pathMatch: 'full'
},
{
- path: 'video-auto-blacklist',
- redirectTo: 'video-auto-blacklist/list',
+ path: 'video-abuses/list',
+ redirectTo: 'abuses/list',
pathMatch: 'full'
},
{
- path: 'video-abuses/list',
- component: VideoAbuseListComponent,
+ path: 'abuses/list',
+ component: AbuseListComponent,
canActivate: [ UserRightGuard ],
data: {
- userRight: UserRight.MANAGE_VIDEO_ABUSES,
+ userRight: UserRight.MANAGE_ABUSES,
meta: {
- title: 'Video abuses list'
+ title: 'Reports'
}
}
},
+ {
+ path: 'video-blacklist',
+ redirectTo: 'video-blocks/list',
+ pathMatch: 'full'
+ },
+ {
+ path: 'video-auto-blacklist',
+ redirectTo: 'video-blocks/list',
+ pathMatch: 'full'
+ },
{
path: 'video-auto-blacklist/list',
- component: VideoAutoBlacklistListComponent,
- canActivate: [ UserRightGuard ],
- data: {
- userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
- meta: {
- title: 'Auto-blacklisted videos'
- }
- }
+ redirectTo: 'video-blocks/list',
+ pathMatch: 'full'
+ },
+ {
+ path: 'video-blacklist',
+ redirectTo: 'video-blocks/list',
+ pathMatch: 'full'
},
{
- path: 'video-blacklist/list',
- component: VideoBlacklistListComponent,
+ path: 'video-blocks/list',
+ component: VideoBlockListComponent,
canActivate: [ UserRightGuard ],
data: {
userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
meta: {
- title: 'Blacklisted videos'
+ title: 'Videos blocked'
}
}
},