]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/moderation.routes.ts
Regroup abuse and blacklisted videos inside "moderation"
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
CommitLineData
614d1ae9
C
1import { Routes } from '@angular/router'
2import { UserRight } from '../../../../../shared'
3import { UserRightGuard } from '@app/core'
4import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
5import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list'
6import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
7
8export const ModerationRoutes: Routes = [
9 {
10 path: 'moderation',
11 component: ModerationComponent,
12 children: [
13 {
14 path: '',
15 redirectTo: 'video-abuses/list',
16 pathMatch: 'full'
17 },
18 {
19 path: 'video-abuses/list',
20 component: VideoAbuseListComponent,
21 canActivate: [ UserRightGuard ],
22 data: {
23 userRight: UserRight.MANAGE_VIDEO_ABUSES,
24 meta: {
25 title: 'Video abuses list'
26 }
27 }
28 },
29 {
30 path: 'video-blacklist/list',
31 component: VideoBlacklistListComponent,
32 canActivate: [ UserRightGuard ],
33 data: {
34 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
35 meta: {
36 title: 'Blacklisted videos'
37 }
38 }
39 }
40 ]
41 }
42]