Testing new supabase structure

This commit is contained in:
2025-12-23 15:01:26 +01:00
parent 4899943cfc
commit b629b9a6e2
8 changed files with 179 additions and 94 deletions
+19
View File
@@ -0,0 +1,19 @@
"use server";
import createClient from "@/lib/supa";
export async function getProfileById(id: string) {
const supabase = await createClient();
const { error, data } = await supabase
.from("profiles")
.select("id, username, display_name, avatar_url, node_address")
.eq("id", id)
.maybeSingle();
if (error) {
throw error;
}
return data;
}