Add username field to users

This commit is contained in:
Tuan Dang
2024-02-23 17:30:49 -08:00
parent 97a7b66c6c
commit bfee74ff4e
19 changed files with 67 additions and 90 deletions
@@ -50,7 +50,7 @@ export const authSignupServiceFactory = ({
throw new Error("Failed to send verification code for complete account");
}
if (!user) {
user = await userDAL.create({ authMethods: [AuthMethod.EMAIL], email, isGhost: false });
user = await userDAL.create({ authMethods: [AuthMethod.EMAIL], username: email, email, isGhost: false });
}
if (!user) throw new Error("Failed to create user");