Updated asset index

This commit is contained in:
jamelreid 2022-02-04 08:16:41 -05:00
parent d93f440d75
commit 0164d219b8
1 changed files with 3 additions and 2 deletions

View File

@ -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 );
} );
} );