Merge pull request #1 from TelegramExchange/feat/add-analytics-overview-endpoint
feat: add analytics overview endpoint
This commit is contained in:
@@ -75,3 +75,21 @@ async def get_spending_analytics(
|
||||
grouping=grouping,
|
||||
)
|
||||
return await deps.get_usecase().get_spending_analytics(input)
|
||||
|
||||
|
||||
@analytics_router.get('/overview')
|
||||
async def get_overview_analytics(
|
||||
workspace_id: uuid.UUID,
|
||||
current_user: Annotated[JWTPayload, Depends(deps.get_current_user)],
|
||||
date_from: datetime.datetime,
|
||||
date_to: datetime.datetime,
|
||||
project_id: uuid.UUID | None = None,
|
||||
) -> dto.GetOverviewAnalyticsOutput:
|
||||
input = dto.GetOverviewAnalyticsInput(
|
||||
user_id=current_user.user_id,
|
||||
workspace_id=workspace_id,
|
||||
date_from=date_from,
|
||||
date_to=date_to,
|
||||
project_id=project_id,
|
||||
)
|
||||
return await deps.get_usecase().get_overview_analytics(input)
|
||||
|
||||
Reference in New Issue
Block a user