feat: add adguard + scrutiny routes
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from fastapi import APIRouter, Depends
|
||||||
|
|
||||||
|
from app.models.sources import AdGuardSnapshot
|
||||||
|
from app.services.aggregator import AggregatorService, get_aggregator_service
|
||||||
|
|
||||||
|
|
||||||
|
router = APIRouter(prefix="/api", tags=["adguard"])
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/adguard", response_model=AdGuardSnapshot)
|
||||||
|
async def get_adguard(
|
||||||
|
aggregator: AggregatorService = Depends(get_aggregator_service),
|
||||||
|
) -> AdGuardSnapshot:
|
||||||
|
return await aggregator.get_adguard()
|
||||||
Reference in New Issue
Block a user