refactor: remove unused requireAdmin function from form actions
This commit is contained in:
@@ -8,10 +8,6 @@ import { redirect } from "next/navigation";
|
||||
import { getServerSession } from "next-auth";
|
||||
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) {
|
||||
const session = await getServerSession(authOptions);
|
||||
const adminIds = (process.env.ADMIN_DISCORD_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user