diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx new file mode 100644 index 0000000..4d15373 --- /dev/null +++ b/src/app/admin/page.tsx @@ -0,0 +1,7 @@ +import { redirect } from "next/navigation"; + +// /admin has no dashboard of its own; the admin layout's wordmark links here, +// so route authenticated admins to the editorials list instead of 404ing. +export default function AdminIndexPage() { + redirect("/admin/redaktionen"); +} \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 0a6dc2c..46c3d61 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,7 +13,7 @@ export default async function HomePage() { // `role` is a custom column; Better Auth returns it (the drizzle adapter // selects all columns) but doesn't type it. Mirror principal.ts's cast. const role = (session.user as { role?: string }).role; - redirect(role === "ADMIN" ? "/admin" : "/redaktion/alben"); + redirect(role === "ADMIN" ? "/admin/redaktionen" : "/redaktion/alben"); } return (