]>
Commit | Line | Data |
---|---|---|
1 | import { Routes } from '@angular/router' | |
2 | import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' | |
3 | import { UserRightGuard } from '@app/core' | |
4 | import { UserRight } from '@shared/models' | |
5 | import { FollowersListComponent } from './followers-list' | |
6 | import { FollowingListComponent } from './following-list/following-list.component' | |
7 | import { FollowsComponent } from './follows.component' | |
8 | ||
9 | export const FollowsRoutes: Routes = [ | |
10 | { | |
11 | path: 'follows', | |
12 | component: FollowsComponent, | |
13 | canActivate: [ UserRightGuard ], | |
14 | data: { | |
15 | userRight: UserRight.MANAGE_SERVER_FOLLOW | |
16 | }, | |
17 | children: [ | |
18 | { | |
19 | path: '', | |
20 | redirectTo: 'following-list', | |
21 | pathMatch: 'full' | |
22 | }, | |
23 | { | |
24 | path: 'following-list', | |
25 | component: FollowingListComponent, | |
26 | data: { | |
27 | meta: { | |
28 | title: 'Following list' | |
29 | } | |
30 | } | |
31 | }, | |
32 | { | |
33 | path: 'followers-list', | |
34 | component: FollowersListComponent, | |
35 | data: { | |
36 | meta: { | |
37 | title: 'Followers list' | |
38 | } | |
39 | } | |
40 | }, | |
41 | { | |
42 | path: 'following-add', | |
43 | redirectTo: 'following-list' | |
44 | }, | |
45 | { | |
46 | path: 'video-redundancies-list', | |
47 | component: VideoRedundanciesListComponent | |
48 | } | |
49 | ] | |
50 | } | |
51 | ] |