Skip to content

Commit d3cb1f7

Browse files
committed
fix: download tracking call failing because call was not authorized
1 parent d36e387 commit d3cb1f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,9 +3114,9 @@ function RemoteFunctions(config = {}) {
31143114
// its required by the Unsplash API guidelines to track downloads for photographers
31153115
// this is just a tracking call, we don't need to wait for the response
31163116
if (image.download_location) {
3117-
fetch(image.download_location)
3117+
fetch(`https://images.phcode.dev/api/images/download?download_location=${encodeURIComponent(image.download_location)}`)
31183118
.catch(error => {
3119-
//
3119+
console.error('download tracking failed:', error);
31203120
});
31213121
}
31223122

0 commit comments

Comments
 (0)