added supabase

This commit is contained in:
Austin
2026-02-20 09:12:47 -06:00
parent 3c293159ff
commit 76f1241761
54 changed files with 3162 additions and 445 deletions
+16
View File
@@ -0,0 +1,16 @@
"use server";
import { createClient } from "@/utils/supabase/server";
import { revalidatePath } from "next/cache";
export async function deleteComment(id: number) {
const supabase = await createClient();
const { error } = await supabase.from("comments").delete().eq("id", id);
if (error) {
throw new Error(`Failed to delete comment: ${error.message}`);
}
revalidatePath("/admin/comments");
}