mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 13:49:57 -05:00
Adding statistics page for Archives.
This commit is contained in:
parent
ad59d67171
commit
2c8f765f2b
7 changed files with 224 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue