Add custom homelab dashboard stack
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app.models.storage import StorageResponse
|
||||
from app.services.aggregator import AggregatorService, get_aggregator_service
|
||||
|
||||
|
||||
router = APIRouter(prefix="/api", tags=["storage"])
|
||||
|
||||
|
||||
@router.get("/storage", response_model=StorageResponse)
|
||||
async def get_storage(
|
||||
aggregator: AggregatorService = Depends(get_aggregator_service),
|
||||
) -> StorageResponse:
|
||||
return await aggregator.get_storage()
|
||||
Reference in New Issue
Block a user