import { getSurveyStats } from '@/lib/survey'; import { NextResponse } from 'next/server'; export async function GET() { try { // Get survey statistics without requiring authentication const stats = getSurveyStats(); return NextResponse.json({ stats }); } catch (error) { console.error('Error getting public stats:', error); return NextResponse.json( { error: 'Failed to get survey statistics' }, { status: 500 } ); } }