aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/+admin/friends/friends.routes.ts
blob: e2cb953b351487547190d9c7a16eed0b2960ad98 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                        
 
                                           


                                                      
                                                 
 
                                      
   

                                

                                    
                                                 
      











                                       
           







                                      
           
         



       
import { Routes } from '@angular/router'

import { UserRightGuard } from '../../core'
import { FriendsComponent } from './friends.component'
import { FriendAddComponent } from './friend-add'
import { FriendListComponent } from './friend-list'
import { UserRight } from '../../../../../shared'

export const FriendsRoutes: Routes = [
  {
    path: 'friends',
    component: FriendsComponent,
    canActivate: [ UserRightGuard ],
    data: {
      userRight: UserRight.MANAGE_PEERTUBE_FOLLOW
    },
    children: [
      {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full'
      },
      {
        path: 'list',
        component: FriendListComponent,
        data: {
          meta: {
            title: 'Friends list'
          }
        }
      },
      {
        path: 'add',
        component: FriendAddComponent,
        data: {
          meta: {
            title: 'Add friends'
          }
        }
      }
    ]
  }
]