emerg: NEVER REMOVE BMS SONGS (EVER)

This commit is contained in:
zkldi
2022-03-31 18:03:17 +01:00
parent d435e3e6c5
commit 643fa5711c
+12
View File
@@ -171,6 +171,18 @@ const syncInstructions: SyncInstructions[] = [
}
},
},
{
pattern: /^songs-(b|p)ms/u,
handler: async (songs: SongDocument[], collection: ICollection<SongDocument>, logger) => {
const r = await GenericUpsert(songs, collection, "id", logger, false);
if (r.thingsChanged) {
await RecalcAllScores({
songID: { $in: r.changedFields },
});
}
},
},
{
pattern: /^songs-/u,
handler: async (songs: SongDocument[], collection: ICollection<SongDocument>, logger) => {