16 lines
426 B
TypeScript
16 lines
426 B
TypeScript
import { getServiceStatusSnapshot } from "@/db/repository";
|
|
import { apiError } from "../respond";
|
|
|
|
export async function GET() {
|
|
try {
|
|
const snapshot = await getServiceStatusSnapshot();
|
|
return Response.json(snapshot, {
|
|
headers: { "cache-control": "no-store" },
|
|
});
|
|
} catch (error) {
|
|
const response = apiError(error);
|
|
response.headers.set("cache-control", "no-store");
|
|
return response;
|
|
}
|
|
}
|