Add challenges background preference support: Extend site preferences and related components to include challengesBackground, update API and UI to handle new background image settings for challenges.
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s

This commit is contained in:
Julien Froidefond
2025-12-15 21:26:30 +01:00
parent 83446759fe
commit d3a4fa7cf5
25 changed files with 8373 additions and 12328 deletions

View File

@@ -19,6 +19,7 @@ export async function updateSitePreferences(data: {
homeBackground?: string | null;
eventsBackground?: string | null;
leaderboardBackground?: string | null;
challengesBackground?: string | null;
}) {
try {
await checkAdminAccess()();
@@ -27,12 +28,14 @@ export async function updateSitePreferences(data: {
homeBackground: data.homeBackground,
eventsBackground: data.eventsBackground,
leaderboardBackground: data.leaderboardBackground,
challengesBackground: data.challengesBackground,
});
revalidatePath("/admin");
revalidatePath("/");
revalidatePath("/events");
revalidatePath("/leaderboard");
revalidatePath("/challenges");
return { success: true, data: preferences };
} catch (error) {