34 lines
614 B
TypeScript
34 lines
614 B
TypeScript
import { notFound } from 'next/navigation'
|
|
import SettingsPage from '../SettingsPage'
|
|
|
|
const ALLOWED_SECTIONS = new Set([
|
|
'seerr',
|
|
'jellyseerr',
|
|
'jellyfin',
|
|
'artwork',
|
|
'sonarr',
|
|
'radarr',
|
|
'prowlarr',
|
|
'qbittorrent',
|
|
'requests',
|
|
'cache',
|
|
'logs',
|
|
'maintenance',
|
|
'magent',
|
|
'general',
|
|
'notifications',
|
|
'site',
|
|
])
|
|
|
|
type PageProps = {
|
|
params: Promise<{ section: string }>
|
|
}
|
|
|
|
export default async function AdminSectionPage({ params }: PageProps) {
|
|
const { section } = await params
|
|
if (!ALLOWED_SECTIONS.has(section)) {
|
|
notFound()
|
|
}
|
|
return <SettingsPage section={section} />
|
|
}
|