This commit is contained in:
jpmvaz
2026-09-13 20:20:06 +01:00
commit 6994063c71
93 changed files with 7613 additions and 0 deletions
+30
View File
@@ -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 }
);
}
}