File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ async function handleEntityId(
4141 if ( ids . length > 0 ) {
4242 entityId = ids [ 0 ] // Use the first ID as the entityId
4343 logs . getLogger ( 'main' ) . log ( `Resolved Entity ID from pointer: ${ entityId } ` )
44+ await taskQueue . publish ( {
45+ entity : {
46+ entityId,
47+ authChain : [ ]
48+ } ,
49+ contentServerUrls : [ 'https://peer.decentraland.org/content' ]
50+ } )
4451 } else {
4552 logs . getLogger ( 'main' ) . error ( 'Error: No entity ID found for the given pointer' )
4653 }
@@ -65,7 +72,8 @@ async function handleEntityId(
6572 if ( urn ) {
6673 const urnParts = urn . split ( ':' )
6774 entityId = urnParts [ 3 ] . split ( '?' ) [ 0 ] // Extract the entityId
68- const baseUrl = urn . split ( 'baseUrl=' ) [ 1 ] // Extract the baseUrl
75+ let baseUrl = urn . split ( 'baseUrl=' ) [ 1 ] // Extract the baseUrl
76+ baseUrl = baseUrl . replace ( / \/ c o n t e n t s \/ ? $ / , '' ) // Remove trailing /contents or /contents/
6977 logs . getLogger ( 'main' ) . log ( `Resolved Entity ID: ${ entityId } , Base URL: ${ baseUrl } ` )
7078
7179 // Publish the resolved entityId and baseUrl
You can’t perform that action at this time.
0 commit comments