This commit is contained in:
+5
-22
@@ -17,21 +17,8 @@ from config.settings import config
|
||||
# Import existing database and components
|
||||
from core.database import NFOGuardDatabase
|
||||
|
||||
# Add web interface path for routes only
|
||||
web_path = os.path.join(os.path.dirname(__file__), "nfoguard-web")
|
||||
if web_path not in sys.path:
|
||||
sys.path.append(web_path)
|
||||
|
||||
# Import web routes from separated system
|
||||
try:
|
||||
from api.web_routes import register_web_routes as register_separated_web_routes
|
||||
use_separated_routes = True
|
||||
print("✅ Using separated web routes with DELETE /api/episodes/ support")
|
||||
except ImportError:
|
||||
# Fallback to old routes if separated routes not available
|
||||
from api.web_routes import register_web_routes
|
||||
use_separated_routes = False
|
||||
print("⚠️ Using legacy web routes - DELETE functionality may be limited")
|
||||
# Import web routes from existing system (now includes DELETE route)
|
||||
from api.web_routes import register_web_routes
|
||||
|
||||
# Import authentication system
|
||||
from api.auth import SimpleAuthMiddleware, AuthSession
|
||||
@@ -165,13 +152,9 @@ def main():
|
||||
# Setup static files and routes
|
||||
setup_static_files(app)
|
||||
|
||||
# Register web routes (prefer separated routes if available)
|
||||
if use_separated_routes:
|
||||
register_separated_web_routes(app, dependencies)
|
||||
print("✅ Registered separated web routes with full /api/episodes/ support")
|
||||
else:
|
||||
register_web_routes(app, dependencies)
|
||||
print("⚠️ Using legacy web routes")
|
||||
# Register web routes (now includes DELETE /api/episodes/ route)
|
||||
register_web_routes(app, dependencies)
|
||||
print("✅ Registered web routes with DELETE /api/episodes/ support")
|
||||
|
||||
print(f"🚀 Starting web server on {web_host}:{web_port}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user