2026-04-26 04:29:23 +08:00
|
|
|
import { NextResponse } from "next/server";
|
2026-04-22 05:57:06 +08:00
|
|
|
|
|
|
|
|
export const dynamic = "force-dynamic";
|
2026-04-26 04:29:23 +08:00
|
|
|
export const runtime = "nodejs";
|
2026-04-22 05:57:06 +08:00
|
|
|
|
|
|
|
|
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-23 07:38:34 +08:00
|
|
|
},
|
2026-04-26 04:29:23 +08:00
|
|
|
},
|
2026-05-11 13:16:34 +08:00
|
|
|
);
|
2026-04-22 05:57:06 +08:00
|
|
|
}
|