REFACTOR API gateway fix 8

This commit is contained in:
Urtzi Alfaro
2025-07-26 23:29:57 +02:00
parent 1291d05183
commit 97ae58fb06
8 changed files with 997 additions and 375 deletions

View File

@@ -56,14 +56,8 @@ async def register(
logger.debug(f"Input validation passed for {user_data.email}")
# ✅ DEBUG: Call auth service with enhanced error tracking
result = await AuthService.register_user_with_tokens(
email=user_data.email.strip().lower(), # Normalize email
password=user_data.password,
full_name=user_data.full_name.strip(),
db=db
)
result = await AuthService.register_user(user_data, db)
logger.info(f"Registration successful for {user_data.email}")
# Record successful registration
@@ -132,11 +126,7 @@ async def login(
)
# Attempt login through AuthService
result = await AuthService.login(
email=login_data.email.strip().lower(), # Normalize email
password=login_data.password,
db=db
)
result = await AuthService.login_user(login_data, db)
# Record successful login
if metrics: