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