17 lines
612 B
Python
17 lines
612 B
Python
"""Роут со списком зарегистрированных загрузчиков: GET /api/downloaders."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app.models import DownloaderInfo
|
|
from app.services.downloader import list_strategies
|
|
|
|
router = APIRouter(prefix="/api/downloaders", tags=["downloaders"])
|
|
|
|
|
|
@router.get("", response_model=list[DownloaderInfo])
|
|
async def list_downloaders() -> list[dict]:
|
|
"""Какие стратегии скачивания сейчас загружены (по убыванию приоритета)."""
|
|
return list_strategies()
|