ENCOA-308

This commit is contained in:
Carlos-Mesquita
2025-01-05 19:04:23 +00:00
parent b4d4afd83a
commit fb73213d63
4 changed files with 18 additions and 4 deletions

View File

@@ -45,7 +45,6 @@ class UserService(IUserService):
error_msg = f"Couldn't upload users. Failed to run command firebase auth import -> ```cmd {result.stdout}```"
self._logger.error(error_msg)
return error_msg
await self._init_users(batch_dto)
FileHelper.remove_file(path)
@@ -68,7 +67,7 @@ class UserService(IUserService):
for user in batch_dto.users:
user_data = {
'UID': str(user.id),
'UID': user.id,
'Email': user.email,
'Email Verified': False,
'Password Hash': user.passwordHash,
@@ -142,7 +141,7 @@ class UserService(IUserService):
'subscriptionExpirationDate': user.expiryDate,
'entities': user.entities
}
await self._db.save_to_db("users", new_user, str(user.id))
await self._db.save_to_db("users", new_user, user.id)
async def _create_code(self, user: UserDTO, maker_id: str) -> str:
code = shortuuid.ShortUUID().random(length=6)
@@ -174,6 +173,7 @@ class UserService(IUserService):
'name': user.groupName.strip(),
'participants': [user_id],
'disableEditing': False,
'entity': user.entities[0]['id']
}
await self._db.save_to_db("groups", new_group, str(uuid.uuid4()))
else: