mirror of
https://gitlab.w-hs.de/an14051/backerup-website.git
synced 2026-07-27 17:35:29 +00:00
feat: add admin links management and updaterup page
- Implemented AdminLinksPage for managing link entries with admin role check. - Created API routes for fetching, updating, and deleting link entries. - Added ProductTabs component for navigation between Backerup and Updaterup. - Developed UpdaterupPage with detailed features, setup instructions, and statistics. - Introduced links database functionality for runtime-editable link overrides.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { getSession } from '@/lib/session'
|
||||
import { getAllLinkEntries } from '@/lib/links-db'
|
||||
import LinksClient from '../LinksClient'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Admin — Links — Backerup',
|
||||
}
|
||||
|
||||
export default async function AdminLinksPage() {
|
||||
const session = await getSession()
|
||||
if (!session || session.role !== 'admin') {
|
||||
redirect('/')
|
||||
}
|
||||
|
||||
const entries = await getAllLinkEntries()
|
||||
|
||||
return <LinksClient initialEntries={entries} />
|
||||
}
|
||||
Reference in New Issue
Block a user