From ad069a0c8bee19a1aefffee9bec2b9efaa40d1de Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 4 Oct 2025 21:41:58 +0000 Subject: [PATCH] Remove fallback logic from updateProfile cgen-96483ec54a764874a26082d6f5caf26e --- client/lib/aethex-database-adapter.ts | 39 --------------------------- 1 file changed, 39 deletions(-) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 423b05e6..5668d5ec 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -335,45 +335,6 @@ export const aethexUserService = { userId: string, updates: Partial, ): Promise { - if (!isSupabaseConfigured) { - const nowIso = new Date().toISOString(); - const stored = await mockAuth.updateProfile( - userId, - { - ...updates, - onboarded: true, - user_type: (updates as any)?.user_type ?? "game_developer", - experience_level: (updates as any)?.experience_level ?? "beginner", - updated_at: nowIso, - } as any, - ); - - const normalized = normalizeProfile( - { - ...stored, - user_type: - (stored as any)?.user_type ?? (updates as any)?.user_type ?? "game_developer", - experience_level: - (stored as any)?.experience_level ?? - (updates as any)?.experience_level ?? - "beginner", - total_xp: (stored as any)?.total_xp ?? 0, - level: (stored as any)?.level ?? 1, - loyalty_points: (stored as any)?.loyalty_points ?? 0, - current_streak: (stored as any)?.current_streak ?? 1, - longest_streak: - (stored as any)?.longest_streak ?? - Math.max((stored as any)?.current_streak ?? 1, 1), - last_streak_at: (stored as any)?.last_streak_at ?? null, - updated_at: (stored as any)?.updated_at ?? nowIso, - created_at: (stored as any)?.created_at ?? nowIso, - }, - stored.email ?? (updates as any)?.email ?? null, - ); - - return normalized; - } - ensureSupabase(); const { data, error } = await supabase