feat: add feedback system with modal, api endpoints, and stats tracking

This commit is contained in:
Riccardo Giorato
2026-04-16 22:02:03 +02:00
parent 200a4e2a29
commit 62f8a0ca35
8 changed files with 263 additions and 32 deletions
+15
View File
@@ -0,0 +1,15 @@
import { NextResponse } from 'next/server';
import { getPagesGeneratedLast24Hours } from '@/lib/db-actions';
export const dynamic = 'force-dynamic';
export const revalidate = 0;
export async function GET() {
try {
const pagesLast24h = await getPagesGeneratedLast24Hours();
return NextResponse.json({ pagesLast24h });
} catch (error) {
console.error('Error fetching stats:', error);
return NextResponse.json({ pagesLast24h: 0 }, { status: 200 });
}
}