Chocobozzz/PeerTube

View on GitHub
client/src/app/+admin/config/config.routes.ts

Summary

Maintainability
A
3 hrs
Test Coverage
import { Routes } from '@angular/router'
import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config'
import { UserRightGuard } from '@app/core'
import { UserRight } from '@peertube/peertube-models'

export const ConfigRoutes: Routes = [
  {
    path: 'config',
    canActivate: [ UserRightGuard ],
    data: {
      userRight: UserRight.MANAGE_CONFIGURATION
    },
    children: [
      {
        path: '',
        redirectTo: 'edit-custom',
        pathMatch: 'full'
      },
      {
        path: 'edit-custom',
        component: EditCustomConfigComponent,
        data: {
          meta: {
            title: $localize`Edit custom configuration`
          }
        }
      }
    ]
  }
]