import { createClient } from "@/lib/supabase/server"; import type { Ort, Fahrzeug } from "@/lib/auftraege/queries"; export async function loadOrt(id: string): Promise { const supabase = await createClient(); const { data } = await supabase.from("orte").select("id, adresse, ansprechpartner").eq("id", id).single(); return data ?? null; } export async function loadFahrzeug(id: string): Promise { const supabase = await createClient(); const { data } = await supabase .from("fahrzeuge") .select("id, kennzeichen, marke, modell") .eq("id", id) .single(); return data ?? null; }