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
@@ -0,0 +1,19 @@
"use server";
import { createClient } from "@/utils/supabase/server";
import { revalidatePath } from "next/cache";
export async function deleteSubscription(id: number) {
const supabase = await createClient();
const { error } = await supabase
.from("subscriptions")
.delete()
.eq("id", id);
if (error) {
throw new Error(`Failed to delete subscription: ${error.message}`);
}
revalidatePath("/admin/subscriptions");
}