v2
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
import { NextResponse } from 'next/server';
|
||||
import { getSettings } from '@/lib/settings';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const settings = await getSettings();
|
||||
|
||||
// Return only public settings (no API key)
|
||||
return NextResponse.json({
|
||||
siteName: settings.siteName,
|
||||
selectedLeague: settings.selectedLeague,
|
||||
primaryColor: settings.primaryColor,
|
||||
secondaryColor: settings.secondaryColor,
|
||||
showLiveMatches: settings.showLiveMatches,
|
||||
showStandings: settings.showStandings,
|
||||
showTopScorers: settings.showTopScorers,
|
||||
showRecentResults: settings.showRecentResults,
|
||||
showUpcoming: settings.showUpcoming,
|
||||
refreshInterval: settings.refreshInterval,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Settings API error:', error);
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to fetch settings' },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user