From ed200cfa405014d66f94267ffc736557e56d3ef0 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 4 Oct 2025 21:41:34 +0000 Subject: [PATCH] Revert getCurrentUser to live Supabase logic cgen-b5f580c72afa465dabc6bac1b1f5e52e --- client/lib/aethex-database-adapter.ts | 31 --------------------------- 1 file changed, 31 deletions(-) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index c3046fdb..fc1a0b98 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -225,37 +225,6 @@ function isTableMissing(err: any): boolean { // User Profile Services export const aethexUserService = { async getCurrentUser(): Promise { - if (!isSupabaseConfigured) { - const { data } = await mockAuth.getUser(); - const user = data.user; - if (!user) return null; - - const profile = await mockAuth.getUserProfile(user.id); - if (!profile || Object.keys(profile || {}).length === 0) { - return await this.createInitialProfile( - user.id, - { - username: user.email?.split("@")[0] || "user", - full_name: user.email?.split("@")[0] || "user", - }, - user.email, - ); - } - - const normalized = normalizeProfile( - { - ...profile, - user_type: (profile as any)?.user_type ?? "game_developer", - experience_level: (profile as any)?.experience_level ?? "beginner", - total_xp: (profile as any)?.total_xp ?? 0, - level: (profile as any)?.level ?? 1, - }, - user.email ?? (profile as any)?.email ?? null, - ); - - return await ensureDailyStreakForProfile(normalized); - } - ensureSupabase(); const {