import { RouteDependencies } from '../types' ; import { registerAppRoutes } from './api/app' ; import { registerRepositoriesRoutes } from './api/repositories' ; import { registerSnapshotsRoutes } from './api/snapshots' ; import { registerRestoreRoutes } from './api/restore' ; import { registerPolicyRoutes } from './api/policy' ; export class ApiRoutes { setup ( dependencies ) { registerAppRoutes ( dependencies ) ; registerRepositoriesRoutes ( dependencies ) ; registerSnapshotsRoutes ( dependencies ) ; registerRestoreRoutes ( dependencies ) ; if ( dependencies . config . isSlmEnabled ) { registerPolicyRoutes ( dependencies ) ; } } }