refactor: remove unused requireAdmin function from form actions

This commit is contained in:
2026-06-30 18:23:42 +07:00 Unverified
parent a875a7b652
commit de3ee40fa4
-4
View File
@@ -8,10 +8,6 @@ import { redirect } from "next/navigation";
import { getServerSession } from "next-auth"; import { getServerSession } from "next-auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { authOptions } from "@/app/api/auth/[...nextauth]/route";
function requireAdmin() {
// No async check needed here — callers should check session before sensitive ops
}
export async function createForm(formData: FormData) { export async function createForm(formData: FormData) {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);
const adminIds = (process.env.ADMIN_DISCORD_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean); const adminIds = (process.env.ADMIN_DISCORD_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean);