Files
root d4d8d8a3b6
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled
refactor: migrate main.py to modular routers and add project roadmap
- Migrated monolithic main.py to feature-scoped routers in app/routers/
- Added GEMINI.md for project context and AI instructional guidelines
- Updated README.md with a comprehensive modernization plan (SQL migration, robust scraping DSL, frontend modernization)
- Improved authentication with cookie support and modular JS
- Updated test suite and documentation
2026-03-24 10:12:04 +00:00

35 lines
827 B
Python

"""
Static pages routes for Ohm Stream Downloader API.
"""
from fastapi import APIRouter, Request
from fastapi.responses import RedirectResponse
router = APIRouter(tags=["static"])
def get_templates():
from main import templates
return templates
@router.get("/web")
async def web_interface(request: Request):
"""Web interface"""
templates = get_templates()
return templates.TemplateResponse("index.html", {"request": request})
@router.get("/login")
async def login_page(request: Request):
"""Login/Register page"""
templates = get_templates()
return templates.TemplateResponse("login.html", {"request": request})
@router.get("/watchlist")
async def watchlist_redirect():
"""Redirect /watchlist to web interface with watchlist hash"""
return RedirectResponse("/web#watchlist")