From 7d8297a243278f9770e2ef3f1aa1d8634d967bd0 Mon Sep 17 00:00:00 2001 From: posimai Date: Sat, 11 Apr 2026 13:58:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Feed=20POST=20=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E6=99=82=E3=81=AF=20GET=20=E3=81=AB=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- index.html | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index d011fd4..2d08b58 100644 --- a/index.html +++ b/index.html @@ -990,12 +990,19 @@ async function loadFeed() { })); } } catch (_) { /* カスタムソース取得失敗 → デフォルトのみで続行 */ } - res = await fetch(FEED_API, { - method: 'POST', - cache: 'no-store', - headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}` }, - body: JSON.stringify({ customFeeds }), - }); + try { + res = await fetch(FEED_API, { + method: 'POST', + cache: 'no-store', + headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}` }, + body: JSON.stringify({ customFeeds }), + }); + } catch (_) { + res = await fetch(FEED_API, { cache: 'no-store' }); + } + if (res.status === 401) { + res = await fetch(FEED_API, { cache: 'no-store' }); + } } else { res = await fetch(FEED_API, { cache: 'no-store' }); }