os.getenv -> config.py

This commit is contained in:
xds
2026-02-19 13:00:51 +03:00
parent 4af5134726
commit dd0f8a1cb6
11 changed files with 48 additions and 52 deletions

View File

@@ -8,6 +8,7 @@ from fastapi.params import Depends
from starlette import status
from starlette.requests import Request
from config import settings
from api.dependency import get_generation_service, get_project_id, get_dao
from api.endpoints.auth import get_current_user
from api.models import (
@@ -197,7 +198,7 @@ async def import_external_generation(
body = await request.body()
# Verify signature
secret = os.getenv("EXTERNAL_API_SECRET")
secret = settings.EXTERNAL_API_SECRET
if not secret:
logger.error("EXTERNAL_API_SECRET not configured")
raise HTTPException(status_code=500, detail="Server configuration error")