refactor: added async await to ONTAP call
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# contains the router for the aggregates endpoint
|
||||
from fastapi import APIRouter, Query
|
||||
from fastapi import APIRouter, Query, Request
|
||||
from typing import List
|
||||
from .aggregate_schema import AggregateSchema, MetricEnum
|
||||
from .aggregate_service import get_aggregates
|
||||
@@ -10,6 +10,7 @@ router = APIRouter(tags=["aggregates"])
|
||||
|
||||
@router.get("/aggregates", response_model=List[AggregateSchema])
|
||||
async def aggregates_endpoint(
|
||||
request: Request,
|
||||
metric: MetricEnum = Query(MetricEnum.relative, description="Metric type"),
|
||||
):
|
||||
return await get_aggregates(metric)
|
||||
return await get_aggregates(request, metric)
|
||||
|
||||
Reference in New Issue
Block a user