Files
dreamweaver/backend/app/api/admin_reload.py
zhangtuo e9d7f8832a Initial commit: clean project structure
- Backend: FastAPI + SQLAlchemy + Celery (Python 3.11+)
- Frontend: Vue 3 + TypeScript + Pinia + Tailwind
- Admin Frontend: separate Vue 3 app for management
- Docker Compose: 9 services orchestration
- Specs: design prototypes, memory system PRD, product roadmap

Cleanup performed:
- Removed temporary debug scripts from backend root
- Removed deprecated admin_app.py (embedded UI)
- Removed duplicate docs from admin-frontend
- Updated .gitignore for Vite cache and egg-info
2026-01-20 18:20:03 +08:00

15 lines
459 B
Python

from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.admin_auth import admin_guard
from app.db.database import get_db
from app.services.provider_cache import reload_providers
router = APIRouter(dependencies=[Depends(admin_guard)])
@router.post("/providers/reload")
async def reload(db: AsyncSession = Depends(get_db)):
cache = await reload_providers(db)
return {k: len(v) for k, v in cache.items()}