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 return None
@use_database @use_database
def save_upload(self, content_uri, media): def save_upload(self, content_uri, upload):
PanUploadInfo.insert( PanUploadInfo.insert(
content_uri=content_uri, content_uri=content_uri,
key=media["key"], key=upload["key"],
iv=media["iv"], iv=upload["iv"],
hashes=media["hashes"], hashes=upload["hashes"],
).on_conflict_ignore().execute() ).on_conflict_ignore().execute()
@use_database @use_database

View File

@ -185,7 +185,7 @@ class TestClass(object):
upload = UploadInfo(event.url, event.key, event.iv, event.hashes) 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) upload_cache = panstore.load_upload(event.url)