Skip to content

Commit

Permalink
Merge pull request #6727 from hotosm/fastapi-refactor
Browse files Browse the repository at this point in the history
fix: User email sign up and changed size of database connection pool …
  • Loading branch information
prabinoid authored Feb 3, 2025
2 parents cf8546a + f771d20 commit d7ca3e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DatabaseConnection:

def __init__(self):
self.database = Database(
settings.SQLALCHEMY_DATABASE_URI.unicode_string(), min_size=5, max_size=20
settings.SQLALCHEMY_DATABASE_URI.unicode_string(), min_size=4, max_size=8
)

async def connect(self):
Expand Down
5 changes: 3 additions & 2 deletions backend/services/users/user_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,9 @@ async def register_user_with_email(user_dto: UserRegisterEmailDTO, db: Database)
if user is None:
user = UserEmail(email=user_email)
user = await user.create(db)

return user
return user
else:
return user.id

@staticmethod
async def get_interests(user: User, db: Database) -> InterestsListDTO:
Expand Down

0 comments on commit d7ca3e9

Please sign in to comment.