Pass email to createInitialProfile on error
cgen-1a4af17b2f464a179e274a7c92fc94c1
This commit is contained in:
parent
6b8da6efea
commit
63cb1a4642
1 changed files with 8 additions and 4 deletions
|
|
@ -233,10 +233,14 @@ export const aethexUserService = {
|
|||
|
||||
if (error) {
|
||||
if ((error as any)?.code === "PGRST116") {
|
||||
return await this.createInitialProfile(user.id, {
|
||||
username: user.email?.split("@")[0] || "user",
|
||||
full_name: user.email?.split("@")[0] || "user",
|
||||
});
|
||||
return await this.createInitialProfile(
|
||||
user.id,
|
||||
{
|
||||
username: user.email?.split("@")[0] || "user",
|
||||
full_name: user.email?.split("@")[0] || "user",
|
||||
},
|
||||
user.email,
|
||||
);
|
||||
}
|
||||
|
||||
if (isTableMissing(error)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue