Log OTK code for development testing
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
spsaefan
2026-06-26 00:27:58 +02:00
parent 91ec7d841c
commit 653dcb0a14
+14 -4
View File
@@ -203,11 +203,21 @@ def request_otk(session: Session, email: str, password: str):
session.commit()
logger.info(
"Saved OTK for account %s with expiration at %s", account.id, expires_at
)
if settings.environment == "prod":
logger.info(
"Saved OTK for account %s with expiration at %s",
account.id,
expires_at,
)
else:
logger.info(
"OTK code for account %s: %s, expires at %s",
account.id,
otk_code,
expires_at,
)
return {"status": "ok"}
return {"status": "ok", "account_id": str(account.id)}
def login(session: Session, response: Response, account_id: uuid.UUID, email_code: str):