From 5d2458455307cb97112790ff9c387050602c8af4 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Mon, 16 Mar 2026 08:27:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(tkpurchase):=20API=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=EC=97=90=20=5Ft=3D=20=ED=83=80=EC=9E=84=EC=8A=A4=ED=83=AC?= =?UTF-8?q?=ED=94=84=20=EC=BA=90=EC=8B=9C=EB=B2=84=EC=8A=A4=ED=84=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 디버깅 결과 서버(DB→Model→API) 모두 정상 3건 반환 확인. 브라우저/프록시 레벨 캐싱이 원인으로 추정되어 api() 함수에 Date.now() 기반 캐시버스터 파라미터 추가. Co-Authored-By: Claude Opus 4.6 --- tkpurchase/web/accounts.html | 2 +- tkpurchase/web/daylabor.html | 2 +- tkpurchase/web/index.html | 2 +- tkpurchase/web/partner-history.html | 4 ++-- tkpurchase/web/partner-portal.html | 4 ++-- tkpurchase/web/partner.html | 2 +- tkpurchase/web/schedule.html | 4 ++-- tkpurchase/web/static/js/tkpurchase-core.js | 3 ++- tkpurchase/web/workreport-summary.html | 2 +- tkpurchase/web/workreport.html | 2 +- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tkpurchase/web/accounts.html b/tkpurchase/web/accounts.html index 06a5a8b..7388755 100644 --- a/tkpurchase/web/accounts.html +++ b/tkpurchase/web/accounts.html @@ -133,7 +133,7 @@ - + diff --git a/tkpurchase/web/daylabor.html b/tkpurchase/web/daylabor.html index 7fcbbd8..ec150e8 100644 --- a/tkpurchase/web/daylabor.html +++ b/tkpurchase/web/daylabor.html @@ -148,7 +148,7 @@ - + diff --git a/tkpurchase/web/index.html b/tkpurchase/web/index.html index 67082c7..c8c284b 100644 --- a/tkpurchase/web/index.html +++ b/tkpurchase/web/index.html @@ -88,7 +88,7 @@ - + diff --git a/tkpurchase/web/partner-history.html b/tkpurchase/web/partner-history.html index d13443f..273bec6 100644 --- a/tkpurchase/web/partner-history.html +++ b/tkpurchase/web/partner-history.html @@ -61,8 +61,8 @@
- - + + diff --git a/tkpurchase/web/partner-portal.html b/tkpurchase/web/partner-portal.html index ecebac8..5ec4e68 100644 --- a/tkpurchase/web/partner-portal.html +++ b/tkpurchase/web/partner-portal.html @@ -81,8 +81,8 @@ - - + + diff --git a/tkpurchase/web/partner.html b/tkpurchase/web/partner.html index 8ea5251..6b37327 100644 --- a/tkpurchase/web/partner.html +++ b/tkpurchase/web/partner.html @@ -294,7 +294,7 @@ - + diff --git a/tkpurchase/web/schedule.html b/tkpurchase/web/schedule.html index b9dff1b..ff65d1d 100644 --- a/tkpurchase/web/schedule.html +++ b/tkpurchase/web/schedule.html @@ -275,8 +275,8 @@ - - + + diff --git a/tkpurchase/web/static/js/tkpurchase-core.js b/tkpurchase/web/static/js/tkpurchase-core.js index 9bba7cf..0de2c72 100644 --- a/tkpurchase/web/static/js/tkpurchase-core.js +++ b/tkpurchase/web/static/js/tkpurchase-core.js @@ -40,7 +40,8 @@ async function api(path, opts = {}) { const token = getToken(); const headers = { 'Authorization': token ? `Bearer ${token}` : '', ...(opts.headers||{}) }; if (!(opts.body instanceof FormData)) headers['Content-Type'] = 'application/json'; - const res = await fetch(API_BASE + path, { ...opts, headers, cache: 'no-store' }); + const cacheBust = path.includes('?') ? '&_t=' + Date.now() : '?_t=' + Date.now(); + const res = await fetch(API_BASE + path + cacheBust, { ...opts, headers, cache: 'no-store' }); if (res.status === 401) { _safeRedirect(); throw new Error('인증 만료'); } if (res.headers.get('content-type')?.includes('text/csv')) return res; const data = await res.json(); diff --git a/tkpurchase/web/workreport-summary.html b/tkpurchase/web/workreport-summary.html index 1a879fe..a5a6f01 100644 --- a/tkpurchase/web/workreport-summary.html +++ b/tkpurchase/web/workreport-summary.html @@ -100,7 +100,7 @@ - + diff --git a/tkpurchase/web/workreport.html b/tkpurchase/web/workreport.html index f42a7ac..1140cc0 100644 --- a/tkpurchase/web/workreport.html +++ b/tkpurchase/web/workreport.html @@ -114,7 +114,7 @@ - +