chore: increase follower count cache revalidation interval to 24 hours
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ export const config = {
|
||||
{
|
||||
name: "Discord server",
|
||||
link: "https://discord.com/invite/3cZQbvW6cF",
|
||||
desc: "เข้าเซิฟเวอร์ในดิส",
|
||||
desc: "เข้าเซิร์ฟเวอร์ในดิส",
|
||||
icon: "/discord.webp",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function getDiscordMemberCount(): Promise<number | null> {
|
||||
`https://discord.com/api/v10/guilds/${encodeURIComponent(guildId)}?with_counts=true`,
|
||||
{
|
||||
headers: { Authorization: `Bot ${token}` },
|
||||
next: { revalidate: 300 },
|
||||
next: { revalidate: 86400 },
|
||||
}
|
||||
);
|
||||
if (!res.ok) return null;
|
||||
|
||||
@@ -5,7 +5,7 @@ export async function getRobloxFollowerCount(): Promise<number | null> {
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://friends.roblox.com/v1/users/${encodeURIComponent(userId)}/followers/count`,
|
||||
{ next: { revalidate: 300 } }
|
||||
{ next: { revalidate: 86400 } }
|
||||
);
|
||||
if (!res.ok) return null;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export async function getYoutubeSubscriberCount(): Promise<number | null> {
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://www.googleapis.com/youtube/v3/channels?part=statistics&id=${encodeURIComponent(channelId)}&key=${encodeURIComponent(apiKey)}`,
|
||||
{ next: { revalidate: 300 } }
|
||||
{ next: { revalidate: 86400 } }
|
||||
);
|
||||
if (!res.ok) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user