feat: updated logic to have login sso

This commit is contained in:
=
2025-05-15 00:56:53 +05:30
parent 1a82809bd5
commit 3d2b2cbbab
5 changed files with 190 additions and 149 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ export const userServiceFactory = ({
if (duplicatedAccounts.length && myAccount) {
await userDAL.transaction(async (tx) => {
await userDAL.delete({ $in: { id: duplicatedAccounts?.map((el) => el.id) } }, tx);
await userDAL.updateById(userId, { username: myAccount.username.toLowerCase() }, tx);
await userDAL.updateById(userId, { username: (myAccount.email || myAccount.username).toLowerCase() }, tx);
});
}
};