Merge branch 'main' of gitlab.com:agenceminuit/musicland
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user