feat: add /api/immich route
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
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()
|
||||||
Reference in New Issue
Block a user