17 lines
462 B
Python
17 lines
462 B
Python
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from app.models.sources import ImmichSnapshot
|
|
from app.services.aggregator import AggregatorService, get_aggregator_service
|
|
|
|
|
|
router = APIRouter(prefix="/api", tags=["immich"])
|
|
|
|
|
|
@router.get("/immich", response_model=ImmichSnapshot)
|
|
async def get_immich(
|
|
aggregator: AggregatorService = Depends(get_aggregator_service),
|
|
) -> ImmichSnapshot:
|
|
return await aggregator.get_immich()
|