From ec086655df860a5d2df6c756a233fd5ce4ffa710 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Wed, 1 Oct 2025 00:53:25 +0000 Subject: [PATCH] Remove demo fallback in getCurrentUser cgen-75c884f4f4284d8699199a6a25547f45 --- client/lib/aethex-database-adapter.ts | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index eefb3ede..a42a0a7b 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -130,26 +130,9 @@ export const aethexUserService = { } if (isTableMissing(error)) { - console.warn( - 'Supabase table "user_profiles" is missing. Falling back to local demo profile.', + throw new Error( + 'Supabase table "user_profiles" is missing. Please run the required migrations.', ); - const fallback: AethexUserProfile = { - id: user.id, - username: user.email?.split("@")[0] || `user_${Date.now()}`, - full_name: user.email?.split("@")[0] || "user", - email: user.email, - user_type: "community_member" as any, - experience_level: "beginner" as any, - level: 1, - total_xp: 0, - loyalty_points: 0, - created_at: new Date().toISOString(), - updated_at: new Date().toISOString(), - } as AethexUserProfile; - try { - localStorage.setItem(`demo_profile_${user.id}`, JSON.stringify(fallback)); - } catch {} - return fallback; } throw error;