revert: hotfix: hide links to hacked channel
This commit is contained in:
+10
-11
@@ -17,17 +17,16 @@ export default function Home() {
|
||||
<div className="mx-auto flex min-h-dvh w-full max-w-6xl flex-col">
|
||||
<section>
|
||||
<center>
|
||||
{/* TEMPORARY: Hacked channel */}
|
||||
{/* <Link href="https://www.youtube.com/@Genshinmaichaigamemurtur"> */}
|
||||
<Image
|
||||
src={Banner}
|
||||
alt="Banner"
|
||||
className="mt-24 w-3/4 rounded-t-xl sm:w-125"
|
||||
width={500}
|
||||
height={100}
|
||||
fetchPriority="high"
|
||||
/>
|
||||
{/* </Link> */}
|
||||
<Link href="https://www.youtube.com/@Genshinmaichaigamemurtur">
|
||||
<Image
|
||||
src={Banner}
|
||||
alt="Banner"
|
||||
className="mt-24 w-3/4 rounded-t-xl sm:w-125"
|
||||
width={500}
|
||||
height={100}
|
||||
fetchPriority="high"
|
||||
/>
|
||||
</Link>
|
||||
</center>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import { youtubeCache } from "@/lib/adaptive-cache";
|
||||
|
||||
export type YoutubeLiveInfo =
|
||||
| {
|
||||
url: string;
|
||||
thumbnails: {
|
||||
url: string;
|
||||
thumbnails: {
|
||||
url: string;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
title: string;
|
||||
}
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
title: string;
|
||||
}
|
||||
| "none";
|
||||
|
||||
type APISearchResource = {
|
||||
@@ -64,7 +64,7 @@ export async function GET(req: NextRequest) {
|
||||
const apiKey = process.env.YOUTUBE_API_KEY;
|
||||
|
||||
// TEMPORARY: Hacked channel
|
||||
if (!apiKey || !channelId && true) return NextResponse.json<YoutubeLiveInfo>("none");
|
||||
if (!apiKey || !channelId) return NextResponse.json<YoutubeLiveInfo>("none");
|
||||
|
||||
const response = await youtubeCache.fetch(
|
||||
`https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=${channelId}&eventType=live&type=video&maxResults=1&key=${apiKey}`,
|
||||
|
||||
Reference in New Issue
Block a user