Files
mnote/wolai-frontend/src/app/api/mnote-web/stream/route.ts
T

22 lines
596 B
TypeScript
Raw Normal View History

2026-04-26 04:29:23 +08:00
import { NextResponse } from "next/server";
export const dynamic = "force-dynamic";
2026-04-26 04:29:23 +08:00
export const runtime = "nodejs";
export async function GET(request: Request) {
2026-05-11 13:16:34 +08:00
const directUrl = new URL("/api/tree/events", request.url);
directUrl.search = new URL(request.url).search;
return NextResponse.json(
{
error: "Next /api/mnote-web/stream compat alias 已退场,请直接使用 /api/tree/events。",
redirectTo: directUrl.toString(),
2026-04-26 04:29:23 +08:00
},
2026-05-11 13:16:34 +08:00
{
status: 410,
headers: {
"x-mnote-compat-boundary": "mnote-web-stream-alias-retired",
},
2026-04-26 04:29:23 +08:00
},
2026-05-11 13:16:34 +08:00
);
}