diff --git a/app/api/routes/node_storage.py b/app/api/routes/node_storage.py index d9c452d..4d74144 100644 --- a/app/api/routes/node_storage.py +++ b/app/api/routes/node_storage.py @@ -35,7 +35,7 @@ async def s_api_v1_storage_post(request): try: file_hash = b58encode(hashlib.sha256(file_content).digest()).decode() - stored_content = db_session.query(StoredContent).filter(StoredContent.hash == file_hash).first() + stored_content = request.ctx.db_session.query(StoredContent).filter(StoredContent.hash == file_hash).first() if stored_content: stored_cid = stored_content.cid.serialize_v1() return {