Files
proxmox-monitor/src/app/api/status/route.js
2026-05-07 06:41:36 +01:00

13 lines
386 B
JavaScript

import { NextResponse } from 'next/server';
import { getSummary } from '@/lib/proxmox';
/** @param {import('next').Request} _req */
export async function GET(_req) {
try {
const data = await getSummary();
return NextResponse.json({ data, timestamp: Date.now() });
} catch (error) {
return NextResponse.json({ error: error.message, data: null }, { status: 502 });
}
}