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

13
firebase-debug.log Normal file
View File

@@ -0,0 +1,13 @@
[debug] [2025-01-05T18:01:58.255Z] ----------------------------------------------------------------------
[debug] [2025-01-05T18:01:58.257Z] Command: /usr/bin/node /usr/local/bin/firebase login --reauth
[debug] [2025-01-05T18:01:58.257Z] CLI Version: 13.28.0
[debug] [2025-01-05T18:01:58.257Z] Platform: linux
[debug] [2025-01-05T18:01:58.257Z] Node Version: v18.19.1
[debug] [2025-01-05T18:01:58.258Z] Time: Sun Jan 05 2025 18:01:58 GMT+0000 (Western European Standard Time)
[debug] [2025-01-05T18:01:58.258Z] ----------------------------------------------------------------------
[debug]
[info]
[info] Visit this URL on this device to log in:
[info] https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=211115440&redirect_uri=http%3A%2F%2Flocalhost%3A9005&login_hint=carlos.mesquita%40ecrop.dev
[info]
[info] Waiting for authentication...

View File

@@ -15,7 +15,7 @@ class Entity(BaseModel):
class UserDTO(BaseModel):
id: uuid.UUID = Field(default_factory=uuid.uuid4)
id: str
email: str
name: str
type: str

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:

View File

@@ -0,0 +1 @@
8e44d32a-b921-4650-a0a5-2ad773356b61,batchentitytest1@ecrop.dev,False,5eoALGIXxSmwj8wRc3U7RGFM4tROrWs/+qJv6O9puXKoCCiniWlDQeWnCFXG8RJBrD48Hoqqoojso6rg31bTXA==,s76hIKNUacTPo8JqYx+7NA==,,,,,,,,,,,,,,,,,,,1736100072082,,
1 8e44d32a-b921-4650-a0a5-2ad773356b61 batchentitytest1@ecrop.dev False 5eoALGIXxSmwj8wRc3U7RGFM4tROrWs/+qJv6O9puXKoCCiniWlDQeWnCFXG8RJBrD48Hoqqoojso6rg31bTXA== s76hIKNUacTPo8JqYx+7NA== 1736100072082