ipfs view searches through all links now
This commit is contained in:
parent
13a6d66f32
commit
da8f7b1633
1 changed files with 2 additions and 1 deletions
|
@ -179,6 +179,7 @@ def ExternalLinkView(request: HttpRequest):
|
|||
|
||||
|
||||
def IPFSView(request: HttpRequest):
|
||||
ipfs_matches = [re.search(r'Qm[\w]{44}', doc.url) for doc in Document.objects.all() if 'ipfs' in doc.url]
|
||||
ipfs_matches = [re.search(r'Qm[\w]{44}', link.url)
|
||||
for link in DocumentLink.objects.order_by('order', '-document_id') if 'ipfs' in link.url]
|
||||
ipfs_cids = [match.group(0) for match in ipfs_matches if match]
|
||||
return HttpResponse("\n".join(ipfs_cids), content_type='text/plain')
|
||||
|
|
Loading…
Reference in a new issue