]>
Commit | Line | Data |
---|---|---|
614d1ae9 C |
1 | import { Routes } from '@angular/router' |
2 | import { UserRight } from '../../../../../shared' | |
3 | import { UserRightGuard } from '@app/core' | |
4 | import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list' | |
5 | import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list' | |
6 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' | |
7 | ||
8 | export const ModerationRoutes: Routes = [ | |
9 | { | |
10 | path: 'moderation', | |
11 | component: ModerationComponent, | |
12 | children: [ | |
13 | { | |
14 | path: '', | |
15 | redirectTo: 'video-abuses/list', | |
16 | pathMatch: 'full' | |
17 | }, | |
ad76628b C |
18 | { |
19 | path: 'video-abuses', | |
20 | redirectTo: 'video-abuses/list', | |
21 | pathMatch: 'full' | |
22 | }, | |
23 | { | |
24 | path: 'video-blacklist', | |
25 | redirectTo: 'video-blacklist/list', | |
26 | pathMatch: 'full' | |
27 | }, | |
614d1ae9 C |
28 | { |
29 | path: 'video-abuses/list', | |
30 | component: VideoAbuseListComponent, | |
31 | canActivate: [ UserRightGuard ], | |
32 | data: { | |
33 | userRight: UserRight.MANAGE_VIDEO_ABUSES, | |
34 | meta: { | |
35 | title: 'Video abuses list' | |
36 | } | |
37 | } | |
38 | }, | |
39 | { | |
40 | path: 'video-blacklist/list', | |
41 | component: VideoBlacklistListComponent, | |
42 | canActivate: [ UserRightGuard ], | |
43 | data: { | |
44 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, | |
45 | meta: { | |
46 | title: 'Blacklisted videos' | |
47 | } | |
48 | } | |
49 | } | |
50 | ] | |
51 | } | |
52 | ] |