fix(admin): P0 integrity — permanent bans, ACL sidebar, rank guards
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
import Link from "next/link";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { StatusCard } from "@/components/admin/dashboard";
|
||||
import { activeBanWhere } from "@/lib/bans";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -31,7 +32,7 @@ export default async function AdminDashboard() {
|
||||
prisma.user.count({ where: { online: "1" } }),
|
||||
prisma.websiteArticles.count(),
|
||||
prisma.ban.count({
|
||||
where: { banExpire: { gt: Math.floor(Date.now() / 1000) } },
|
||||
where: activeBanWhere(),
|
||||
}),
|
||||
]);
|
||||
} catch {}
|
||||
|
||||
Reference in New Issue
Block a user