Skip to content

Commit ed6e6a2

Browse files
committed
rebase and lint
1 parent 5dfc0f0 commit ed6e6a2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

backend/app/routes/auth.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import logging
2+
13
from fastapi import APIRouter, Depends, HTTPException, Query, Request, Response
24
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
35
from sqlalchemy.orm import Session
@@ -129,17 +131,13 @@ async def send_email_verification(
129131
language = "en" # Default to English if invalid
130132

131133
# Log for debugging
132-
import logging
133-
134134
logger = logging.getLogger(__name__)
135135
logger.info(f"Sending email verification to {email} with language: {language}")
136136

137137
auth_service.send_email_verification_link(email, language)
138138
return Response(status_code=204)
139139
except Exception as e:
140140
# Log error but don't reveal if email exists or not for security reasons
141-
import logging
142-
143141
logger = logging.getLogger(__name__)
144142
logger.error(f"Error sending email verification: {str(e)}")
145143
# Always return success even if email doesn't exist

backend/app/services/implementations/auth_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23

34
import firebase_admin.auth
45
from fastapi import HTTPException
@@ -113,8 +114,6 @@ def send_email_verification_link(self, email: str, language: str = None) -> None
113114
# Normalize and validate language
114115
# If not provided, check environment variable, otherwise default to English
115116
if not language:
116-
import os
117-
118117
language = os.getenv("EMAIL_LANGUAGE", "en").lower()
119118
else:
120119
language = language.lower()

0 commit comments

Comments
 (0)