mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 20:51:17 +00:00
16 lines
472 B
TypeScript
16 lines
472 B
TypeScript
import "server-only"
|
|
import { createAdminClient } from "@/lib/supabase/admin"
|
|
|
|
export async function getCredentials(clientId: string) {
|
|
const supabase = createAdminClient()
|
|
|
|
const { data, error } = await supabase
|
|
.from("credentials")
|
|
.select("id, service, username, created_at, updated_at")
|
|
.eq("client_id", clientId)
|
|
.order("service")
|
|
|
|
if (error) throw new Error("Passwörter konnten nicht geladen werden.")
|
|
|
|
return data
|
|
}
|