fix: centralize protected page access
This commit is contained in:
1 parent
844b8f7afd
commit
e328267763
11 files changed
+132
-25
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import { eq, desc, and, sql, inArray } from "drizzle-orm";
|
||||
import { db } from "@/db/client";
|
||||
import { billingReports, usages, editorialAccounts } from "@/db/schema";
|
||||
import { requireActiveEditorial } from "@/modules/auth/principal";
|
||||
import { headers } from "next/headers";
|
||||
import Link from "next/link";
|
||||
import { formatBerlinDateTime } from "@/modules/downloads/format";
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
|
||||
import { FileText } from "lucide-react";
|
||||
|
||||
import { requireEditorial } from "../access";
|
||||
|
||||
export default async function AbrechnungenPage() {
|
||||
const principal = await requireActiveEditorial(new Headers(await headers()));
|
||||
const principal = await requireEditorial();
|
||||
|
||||
// 1. Hole alle PDF-Abrechnungen (abgeschlossene Reports)
|
||||
const reports = await db
|
||||
|
||||
Reference in new issue
Block a user