fix(tkpurchase): API 요청에 _t= 타임스탬프 캐시버스터 추가
디버깅 결과 서버(DB→Model→API) 모두 정상 3건 반환 확인. 브라우저/프록시 레벨 캐싱이 원인으로 추정되어 api() 함수에 Date.now() 기반 캐시버스터 파라미터 추가. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-accounts.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-accounts.js?v=2026031601"></script>
|
||||||
<script>initAccountsPage();</script>
|
<script>initAccountsPage();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-daylabor.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-daylabor.js?v=2026031601"></script>
|
||||||
<script>initDayLaborPage();</script>
|
<script>initDayLaborPage();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-dashboard.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-dashboard.js?v=2026031601"></script>
|
||||||
<script>initDashboard();</script>
|
<script>initDashboard();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
<div id="historyPagination" class="mt-4 flex justify-center gap-2"></div>
|
<div id="historyPagination" class="mt-4 flex justify-center gap-2"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-partner-history.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-partner-history.js?v=2026031602"></script>
|
||||||
<script>initPartnerHistory();</script>
|
<script>initPartnerHistory();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -81,8 +81,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-partner-portal.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-partner-portal.js?v=2026031602"></script>
|
||||||
<script>initPartnerPortal();</script>
|
<script>initPartnerPortal();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -294,7 +294,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-partner.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-partner.js?v=2026031601"></script>
|
||||||
<script>initPartnerPage();</script>
|
<script>initPartnerPage();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -275,8 +275,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-schedule.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-schedule.js?v=2026031602"></script>
|
||||||
<script>initSchedulePage();</script>
|
<script>initSchedulePage();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ async function api(path, opts = {}) {
|
|||||||
const token = getToken();
|
const token = getToken();
|
||||||
const headers = { 'Authorization': token ? `Bearer ${token}` : '', ...(opts.headers||{}) };
|
const headers = { 'Authorization': token ? `Bearer ${token}` : '', ...(opts.headers||{}) };
|
||||||
if (!(opts.body instanceof FormData)) headers['Content-Type'] = 'application/json';
|
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.status === 401) { _safeRedirect(); throw new Error('인증 만료'); }
|
||||||
if (res.headers.get('content-type')?.includes('text/csv')) return res;
|
if (res.headers.get('content-type')?.includes('text/csv')) return res;
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-workreport-summary.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-workreport-summary.js?v=2026031601"></script>
|
||||||
<script>initSummaryPage();</script>
|
<script>initSummaryPage();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
|
<script src="/static/js/tkpurchase-core.js?v=2026031604"></script>
|
||||||
<script src="/static/js/tkpurchase-workreport.js?v=2026031601"></script>
|
<script src="/static/js/tkpurchase-workreport.js?v=2026031601"></script>
|
||||||
<script>initWorkReportPage();</script>
|
<script>initWorkReportPage();</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user