update theme format

This commit is contained in:
SethBurkart123
2024-05-20 23:38:23 +10:00
parent f6c22ae846
commit 8ab06a8201
+6 -12
View File
@@ -50,19 +50,13 @@ const shareTheme = async (themeID: string) => {
// Prepare the non-file data for uploading // Prepare the non-file data for uploading
const data = { const data = {
name: themeData.name || 'Unnamed Theme', ...themeWithoutImages,
description: themeData.description || 'No description', images: finalImages.map((image) => ({
theme: JSON.stringify({ id: image.id,
...themeWithoutImages, variableName: image.variableName,
images: finalImages.map((image) => ({ data: image.data,
id: image.id, })),
variableName: image.variableName,
data: image.data,
})),
}),
submitted: true,
coverImage: coverImageBase64, coverImage: coverImageBase64,
images: finalImages,
}; };
saveThemeFile(data, themeData.name || 'Unnamed_Theme'); saveThemeFile(data, themeData.name || 'Unnamed_Theme');