From f458486583eda203da1409dd557503f75450b9d9 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Thu, 2 Jul 2026 18:31:10 +0700 Subject: [PATCH] fix: disable fetch caching for follower count requests and update docker logs command --- lib/followers/discord.ts | 2 +- lib/followers/roblox.ts | 2 +- lib/followers/tiktok.ts | 2 +- lib/followers/youtube.ts | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/followers/discord.ts b/lib/followers/discord.ts index 2022c22..9793329 100644 --- a/lib/followers/discord.ts +++ b/lib/followers/discord.ts @@ -8,7 +8,7 @@ export async function getDiscordMemberCount(): Promise { `https://discord.com/api/v10/guilds/${encodeURIComponent(guildId)}?with_counts=true`, { headers: { Authorization: `Bot ${token}` }, - next: { revalidate: 3600 }, + cache: "no-store", signal: AbortSignal.timeout(5000), } ); diff --git a/lib/followers/roblox.ts b/lib/followers/roblox.ts index 14ba3c0..74028fe 100644 --- a/lib/followers/roblox.ts +++ b/lib/followers/roblox.ts @@ -5,7 +5,7 @@ export async function getRobloxFollowerCount(): Promise { try { const res = await fetch( `https://friends.roblox.com/v1/users/${encodeURIComponent(userId)}/friends/count`, - { next: { revalidate: 3600 }, signal: AbortSignal.timeout(5000) } + { cache: "no-store", signal: AbortSignal.timeout(5000) } ); if (!res.ok) return null; diff --git a/lib/followers/tiktok.ts b/lib/followers/tiktok.ts index 8705193..ef6ba94 100644 --- a/lib/followers/tiktok.ts +++ b/lib/followers/tiktok.ts @@ -73,7 +73,7 @@ export async function getTiktokProfile(): Promise { "https://open.tiktokapis.com/v2/user/info/?fields=follower_count,display_name,username,avatar_url", { headers: { Authorization: `Bearer ${accessToken}` }, - next: { revalidate: 3600 }, + cache: "no-store", signal: AbortSignal.timeout(5000), } ); diff --git a/lib/followers/youtube.ts b/lib/followers/youtube.ts index 4a9edcf..543d7ea 100644 --- a/lib/followers/youtube.ts +++ b/lib/followers/youtube.ts @@ -6,7 +6,7 @@ export async function getYoutubeSubscriberCount(): Promise { try { const res = await fetch( `https://www.googleapis.com/youtube/v3/channels?part=statistics&id=${encodeURIComponent(channelId)}&key=${encodeURIComponent(apiKey)}`, - { next: { revalidate: 3600 }, signal: AbortSignal.timeout(5000) } + { cache: "no-store", signal: AbortSignal.timeout(5000) } ); if (!res.ok) return null; diff --git a/package.json b/package.json index 043bb40..5e8dce5 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "start": "next start", "lint": "eslint", "up": "docker compose up -d --build", - "logs": "docker compose logs -f", + "logs": "docker compose logs -f erika", "db:generate": "drizzle-kit generate", "db:migrate": "drizzle-kit migrate", "db": "drizzle-kit"