feat: add TikTok follower integration and reduce cache revalidation interval to one hour
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getYoutubeSubscriberCount } from "./youtube";
|
||||
import { getRobloxFollowerCount } from "./roblox";
|
||||
import { getDiscordMemberCount } from "./discord";
|
||||
import { getTiktokFollowerCount } from "./tiktok";
|
||||
|
||||
export interface FollowerCounts {
|
||||
youtube: number | null;
|
||||
@@ -15,15 +16,13 @@ export interface FollowerInfo {
|
||||
}
|
||||
|
||||
export async function getFollowerCounts(): Promise<FollowerCounts> {
|
||||
const [youtube, roblox, discord] = await Promise.all([
|
||||
const [youtube, roblox, discord, tiktok] = await Promise.all([
|
||||
getYoutubeSubscriberCount(),
|
||||
getRobloxFollowerCount(),
|
||||
getDiscordMemberCount(),
|
||||
getTiktokFollowerCount(),
|
||||
]);
|
||||
|
||||
const tiktokEnv = process.env.TIKTOK_FOLLOWERS;
|
||||
const tiktok = tiktokEnv ? Number(tiktokEnv) : null;
|
||||
|
||||
return { youtube, roblox, discord, tiktok };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user