config issues prod
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||
from settings_dev import settings
|
||||
|
||||
# Dynamically import settings based on MODE environment variable
|
||||
mode = os.environ.get('MODE', 'DEVELOPMENT').upper()
|
||||
if mode == 'PRODUCTION':
|
||||
from settings_prod import settings
|
||||
else:
|
||||
from settings_dev import settings
|
||||
|
||||
import requests
|
||||
from fastapi import HTTPException, status
|
||||
@@ -146,4 +152,4 @@ def get_forwardings(phone_number: str = None):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
detail=f"An unexpected error occurred: {e} - Request params: {params}"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user