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
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user