This commit is contained in:
Andrea Spacca 2020-12-22 21:00:09 +01:00
parent 404dfe568c
commit 3a380cc91e
2 changed files with 5 additions and 5 deletions

View File

@ -182,12 +182,12 @@ class PanStore:
return None
@use_database
def save_upload(self, content_uri, media):
def save_upload(self, content_uri, upload):
PanUploadInfo.insert(
content_uri=content_uri,
key=media["key"],
iv=media["iv"],
hashes=media["hashes"],
key=upload["key"],
iv=upload["iv"],
hashes=upload["hashes"],
).on_conflict_ignore().execute()
@use_database

View File

@ -185,7 +185,7 @@ class TestClass(object):
upload = UploadInfo(event.url, event.key, event.iv, event.hashes)
panstore.save_upload(event.url)
panstore.save_upload(event.url, {"key": event.key, "iv": event.iv, "hashes": event.hashes})
upload_cache = panstore.load_upload(event.url)