Adding statistics page for Archives.

This commit is contained in:
Roland 2026-02-02 15:15:28 -07:00
parent ad59d67171
commit 2c8f765f2b
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 224 additions and 2 deletions

View file

@ -24,6 +24,13 @@ archive_bp = Blueprint('Archive', '/api/archive')
logger = logger.getChild(__name__)
@archive_bp.get('/statistics')
@openapi.response(HTTPStatus.OK, schema.ArchiveStatisticsResponse)
async def statistics(_: Request):
ret = await lib.get_statistics()
return json_response(ret, HTTPStatus.OK)
@archive_bp.get('/<archive_id:int>')
@openapi.description('Get an archive')
@openapi.response(HTTPStatus.NOT_FOUND, JSONErrorResponse)