optimized iframe view
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user