diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 67a751e2..b20fe86a 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -532,6 +532,20 @@ export const aethexUserService = { .select() .single(); if (upsertError) throw upsertError; + + if (upserted && updates.onboarded === true) { + try { + await aethexNotificationService.createNotification( + userId, + "success", + "🎉 Welcome to AeThex!", + "You've completed your profile setup. Let's get started!", + ); + } catch (notifError) { + console.warn("Failed to create onboarding notification:", notifError); + } + } + return upserted as AethexUserProfile; } @@ -544,6 +558,19 @@ export const aethexUserService = { throw error; } + if (data && updates.onboarded === true) { + try { + await aethexNotificationService.createNotification( + userId, + "success", + "🎉 Welcome to AeThex!", + "You've completed your profile setup. Let's get started!", + ); + } catch (notifError) { + console.warn("Failed to create onboarding notification:", notifError); + } + } + return normalizeProfile(data); },