Skip to content

Commit 88497d1

Browse files
committed
remove unnecessary unsplash download ping
1 parent ab2a8d4 commit 88497d1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/v2/unsplash.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ const sizes = {
66
};
77

88
export const getUnsplashImage = async (query, quality, ...rest) => {
9-
const [env, ctx] = rest;
9+
const [env] = rest;
1010
query.set('client_id', env.UNSPLASH_TOKEN);
1111
const ref = `?utm_source=${env.UNSPLASH_REFERRAL}&utm_medium=referral`;
1212
const size = sizes[quality];
1313
const data = await (
1414
await fetch(`https://api.unsplash.com/photos/random?${query.toString()}`)
1515
).json();
16-
ctx.waitUntil(fetch(`${data.links.download_location}&client_id=${env.UNSPLASH_TOKEN}`)); // api requirement
1716
return {
1817
blur_hash: data.blur_hash,
1918
camera: data.exif.model ?? null,

0 commit comments

Comments
 (0)