refactor: migrate project data

This commit is contained in:
Carlos Valente
2025-07-08 17:11:25 +02:00
committed by Carlos Valente
parent 1fc6f9b3ea
commit 6f34e1006b
38 changed files with 136 additions and 228 deletions
@@ -322,8 +322,8 @@ export async function editCurrentProjectData(newData: Partial<ProjectData>) {
const updatedProjectData = await getDataProvider().setProjectData(newData);
// Delete the old logo if the logo has been removed
if (!updatedProjectData.projectLogo && currentProjectData.projectLogo) {
const filePath = join(publicDir.logoDir, currentProjectData.projectLogo);
if (!updatedProjectData.logo && currentProjectData.logo) {
const filePath = join(publicDir.logoDir, currentProjectData.logo);
deleteFile(filePath).catch((_error) => {
/** we do not handle this error */