You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const request = (format: string, retries = 0): Promise<Format | null> => {
return Pieces.formatApi.formatSnapshot({ format, transferable: true }).catch(async () => {
if (retries > 3) return null;
await timeoutPromise(AssetFacade.RETRY_MS * Math.random());
return request(format, retries += 1);
});
};
const queue = formatIds.map(ids => {
// preview and original can be the same id
// there is downstream changes from here if we only return one format
// so I'm just returning the same promise twice if the ids are the same
if (ids[0] === ids[1]) {
const formatSnapshot = request(ids[0]);
return Promise.all([formatSnapshot, formatSnapshot]).then(AssetsStorage.rehydrateAsset);
}
return Promise.all(ids.map(request)).then(AssetsStorage.rehydrateAsset);
});
The text was updated successfully, but these errors were encountered:
The user should be able to see collections of snippets based on specific languages.
Solution:
You need to fetch the asset and then join it with its formats as well as any other metadata you want to fetch.
Here we are merging assets with formats
The text was updated successfully, but these errors were encountered: