feat: chat widget
This commit is contained in:
@@ -66,8 +66,10 @@ export async function GET() {
|
||||
},
|
||||
);
|
||||
|
||||
if (!response.ok)
|
||||
throw new Error(`YouTube API error: ${response.statusText}`);
|
||||
if (!response.ok) {
|
||||
console.error(`YouTube API error: ${response.statusText}`);
|
||||
return NextResponse.json("none");
|
||||
}
|
||||
|
||||
const data: APISearchResponse = await response.json();
|
||||
|
||||
@@ -88,4 +90,6 @@ export async function GET() {
|
||||
return NextResponse.json<YoutubeLiveInfo>(res);
|
||||
}
|
||||
|
||||
export const revalidate = 60;
|
||||
export const POST = GET;
|
||||
|
||||
export const revalidate = 60;
|
||||
|
||||
Reference in New Issue
Block a user