Merge branch 'main' of gitlab.com:agenceminuit/musicland

This commit is contained in:
2025-10-03 14:22:38 +02:00
10 changed files with 265 additions and 305 deletions
+14
View File
@@ -33,6 +33,20 @@ exports.onProjectUpdate = onDocumentWritten(
batch.delete(doc.ref);
});
await batch.commit();
} else {
if (previousData) {
// edit
if (!previousData?.songUrl && currentData?.songUrl) {
await refList.projects.doc(projectId).update({
hasSong: true,
});
}
if (!previousData?.playbackUrl && currentData?.playbackUrl) {
await refList.projects.doc(projectId).update({
hasPlayback: true,
});
}
}
}
} catch (e) {
console.log(e);