mc-dashboard/app/api/status/route.ts

13 lines
371 B
TypeScript
Raw Permalink Normal View History

import { NextResponse } from "next/server";
import { probeStatus } from "@/lib/server-status";
import { memoAsync } from "@/lib/cache";
export const dynamic = "force-dynamic";
export async function GET() {
const result = await memoAsync("status", 3000, probeStatus);
return NextResponse.json(result, {
headers: { "Cache-Control": "public, max-age=3" },
});
}