Include ipfs_cid in republish payload to L2
When republishing/updating an asset on L2, now sends the IPFS CID so L2 can update its record and pin the content. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2925,6 +2925,10 @@ async def republish_cache_to_l2(
|
||||
if not token:
|
||||
raise HTTPException(401, "Authentication token required")
|
||||
|
||||
# Get IPFS CID from cache item
|
||||
cache_item = await database.get_cache_item(content_hash)
|
||||
ipfs_cid = cache_item.get("ipfs_cid") if cache_item else None
|
||||
|
||||
# Call L2 update endpoint (use user's L2 server)
|
||||
l2_server = ctx.l2_server
|
||||
try:
|
||||
@@ -2935,6 +2939,7 @@ async def republish_cache_to_l2(
|
||||
"description": meta.get("description"),
|
||||
"tags": meta.get("tags"),
|
||||
"origin": meta.get("origin"),
|
||||
"ipfs_cid": ipfs_cid,
|
||||
"metadata": {
|
||||
"filename": meta.get("filename"),
|
||||
"folder": meta.get("folder"),
|
||||
|
||||
Reference in New Issue
Block a user