Changing Archive Sync to Update and Alternatives to History.

This commit is contained in:
Roland 2022-11-14 15:42:57 -07:00
parent a17eb6559e
commit 11bd59cec0
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 51 additions and 53 deletions

View file

@ -23,8 +23,8 @@ logger = logger.getChild(__name__)
async def get_archive(_: Request, archive_id: int):
archive = lib.get_archive(archive_id=archive_id)
archive_file = archive.singlefile_file.__json__()
alternatives = [i.singlefile_file.__json__() for i in archive.alternatives]
return json_response({'file': archive_file, 'alternatives': alternatives})
history = [i.singlefile_file.__json__() for i in archive.history]
return json_response({'file': archive_file, 'history': history})
@bp.delete('/<archive_ids:int>')