Open
Description
When developing applications I am constantly doing:
item.thumbnail = item.thumbnail
? `${portal}/content/items/${item.id}/info/${item.thumbnail}?${token}`
: null;
since this is standard across everything so we should be able to do it any time we return an item from anywhere in REST JS and it would save all of us a lot of headache probably something more like this would handle token
being optional for public items.
let thumbnailURL = item.thumbnail
? `${portal}/content/items/${item.id}/info/${item.thumbnail}`
: null;
if(thumbnailURL && item.access !== "public") {
thumbnailURL += `?${token}`;
}
item.thumbnail = thumbnailURL