File size: 380 Bytes
88c4c60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import { NextResponse } from "next/server";
import { getUsageStats } from "@/lib/usageDb";
export async function GET() {
try {
const stats = await getUsageStats();
return NextResponse.json(stats);
} catch (error) {
console.error("Error fetching usage stats:", error);
return NextResponse.json({ error: "Failed to fetch usage stats" }, { status: 500 });
}
}
|