34 lines
594 B
TypeScript
34 lines
594 B
TypeScript
import { notFound } from 'next/navigation'
|
|
import SettingsPage from '../SettingsPage'
|
|
|
|
const ALLOWED_SECTIONS = new Set([
|
|
'jellyseerr',
|
|
'jellyfin',
|
|
'artwork',
|
|
'sonarr',
|
|
'radarr',
|
|
'prowlarr',
|
|
'qbittorrent',
|
|
'requests',
|
|
'cache',
|
|
'invites',
|
|
'password',
|
|
'captcha',
|
|
'smtp',
|
|
'notifications',
|
|
'expiry',
|
|
'logs',
|
|
'maintenance',
|
|
])
|
|
|
|
type PageProps = {
|
|
params: { section: string }
|
|
}
|
|
|
|
export default function AdminSectionPage({ params }: PageProps) {
|
|
if (!ALLOWED_SECTIONS.has(params.section)) {
|
|
notFound()
|
|
}
|
|
return <SettingsPage section={params.section} />
|
|
}
|