completionId: cgen-db8b9f1618ab4c408531490c833e1c76
cgen-db8b9f1618ab4c408531490c833e1c76
This commit is contained in:
parent
bd075e7ffa
commit
08d3ea25f3
1 changed files with 27 additions and 0 deletions
|
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue