Updated asset index
This commit is contained in:
parent
d93f440d75
commit
0164d219b8
|
@ -31,8 +31,9 @@ const fetchAssetId = () => {
|
|||
} );
|
||||
|
||||
response.on( 'end', () => {
|
||||
const parsedBody = JSON.parse( responseBody );
|
||||
resolve( parsedBody[0].id );
|
||||
const assets = JSON.parse( responseBody );
|
||||
// use the most recently uploaded asset
|
||||
resolve( assets[ assets.length - 1 ].id );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in New Issue