fix: migrate leftover old SSE code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { ps } from "@/lib/db/redis";
|
||||
import { sse } from "@/lib/db/sse-endpoints";
|
||||
|
||||
export const revalidate = 900;
|
||||
|
||||
@@ -84,6 +84,6 @@ export async function GET() {
|
||||
title: live.snippet.title,
|
||||
};
|
||||
|
||||
await ps.publish(res, { event: "live", topic: "active" });
|
||||
sse.active.pub("live", res);
|
||||
return NextResponse.json<YoutubeLiveInfo>(res);
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import { ps } from "@/lib/db/redis";
|
||||
|
||||
export async function GET(
|
||||
_req: Request,
|
||||
{ params }: { params: Promise<{ ver: string }> },
|
||||
) {
|
||||
const { ver } = await params;
|
||||
return ps.new(`tl.${ver}`);
|
||||
}
|
||||
Reference in New Issue
Block a user