From b5213095e61947b7d427db4875845064ae9f7e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Tue, 24 Jan 2023 22:28:28 +0100 Subject: [PATCH] Revert to forwarding GitHub response's ETag --- src/pages/playlists/[playlistId]/snapshots.json.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/playlists/[playlistId]/snapshots.json.ts b/src/pages/playlists/[playlistId]/snapshots.json.ts index 87f1583..ac0c4b3 100644 --- a/src/pages/playlists/[playlistId]/snapshots.json.ts +++ b/src/pages/playlists/[playlistId]/snapshots.json.ts @@ -65,7 +65,6 @@ export const get: APIRoute = async ({ request, params }) => { ]; const body = JSON.stringify(payload); - const ETag = payload[0].snapshotId; const cacheControlDirectives = Date.now() > untilDate.getTime() @@ -77,7 +76,7 @@ export const get: APIRoute = async ({ request, params }) => { headers: { 'Content-Type': 'application/json;charset=utf-8', 'Cache-Control': `public, ${cacheControlDirectives}`, - ETag + ETag: etag as string } }); } catch (error) {