fix: migrate leftover old SSE code

This commit is contained in:
2026-04-09 05:03:18 +07:00 Unverified
parent 31b3ef0e5c
commit 86990bee24
3 changed files with 4 additions and 11 deletions
+2 -2
View File
@@ -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);
}
-9
View File
@@ -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}`);
}