Перейти к содержанию

archive

get_archive_statistics async

get_archive_statistics(
    _: Annotated[
        SotransOIDCUserModel,
        Depends(
            get_current_user(
                required_role_names=[company_logistician]
            )
        ),
    ]
) -> MonthlyStatisticsResponse

Each number in key represents how far ago starting period was.

Source code in api/endpoints/orders/archive.py
87
88
89
90
91
92
93
94
95
96
97
98
99
@archive_router.get("/statistics")
async def get_archive_statistics(
    _: Annotated[
        SotransOIDCUserModel,
        Depends(
            idp.get_current_user(
                required_role_names=[SotransRole.company_logistician]
            )
        ),
    ],
) -> MonthlyStatisticsResponse:
    """Each number in key represents how far ago starting period was."""
    return await on_get_archive_stats()