From 9fa20c53c60427fcc1c60ecec6883fa97fcb50cd Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 4 Oct 2025 21:35:57 +0000 Subject: [PATCH] Add fallback for listProfiles cgen-00a8278f945146f2bd563c52b6bc8e74 --- client/lib/aethex-database-adapter.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 4c7eaef2..6f63ccb5 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -344,6 +344,21 @@ export const aethexUserService = { }, async listProfiles(limit = 50): Promise { + if (!isSupabaseConfigured) { + return mockAuth.getAllProfiles().slice(0, limit).map((row) => + normalizeProfile( + { + ...row, + user_type: (row as any)?.user_type || "game_developer", + experience_level: (row as any)?.experience_level || "beginner", + total_xp: (row as any)?.total_xp ?? 0, + level: (row as any)?.level ?? 1, + }, + (row as any)?.email, + ), + ); + } + ensureSupabase(); const { data, error } = await supabase