mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 20:51:17 +00:00
15 lines
359 B
TypeScript
15 lines
359 B
TypeScript
import "server-only"
|
|
import { createAdminClient } from "@/lib/supabase/admin"
|
|
|
|
export async function getClients() {
|
|
const supabase = createAdminClient()
|
|
const { data, error } = await supabase
|
|
.from("profiles")
|
|
.select("id, name, email")
|
|
.eq("role", "client")
|
|
.order("name")
|
|
|
|
if (error) return []
|
|
|
|
return data
|
|
}
|