import { createServerClient } from '@/shared/db/supabase-client';

// --- ASA GENERATED START ---
// Repository for auth/login slice.
// --- ASA GENERATED END ---

// --- USER CODE START ---

export async function getProfileByUserId(userId: string) {
  const supabase = createServerClient();
  const { data, error } = await supabase
    .from('profiles')
    .select('*')
    .eq('id', userId)
    .single();

  if (error) {
    return null;
  }
  return data;
}

// --- USER CODE END ---
