REFACTOR API gateway fix 8
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user