os.getenv -> config.py
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user