diff --git a/index.ts b/index.ts index 951f778..ebf50cc 100644 --- a/index.ts +++ b/index.ts @@ -68,6 +68,9 @@ async function getTBAEndpoint(endpoint: string): Promise { console.log("Fetching... " + endpoint); const headers = new Headers(authHeaders); + if (tbaCache[endpoint]) { + headers.append("If-None-Match", tbaCache[endpoint].etag); + } const response = await fetch(BASE_URL + endpoint, { headers }); let data;