dev@locazia: remove accept type whitelist

This commit is contained in:
user committed 2024-03-08 02:34:48 +03:00
1 parent a75dc3f31a
commit 88583ddc4e
3 files changed
+16 -2

No files matched your search

+12
View File
@@ -98,3 +98,15 @@ async def s_api_v1_storage_get(request, file_hash=None):
return response.json({"error": "File not found"}, status=404)
return await response.file(file_path)
async def s_api_v1_storage_decode_cid(request, content_id=None):
cid, errmsg = resolve_content(content_id)
if errmsg:
return response.json({"error": errmsg}, status=400)
return response.json({
"content_hash": b58encode(cid.content_hash).decode(),
"onchain_index": cid.onchain_index,
"accept_type": cid.accept_type,
})