Enforce that charts-usc|bms can never have things removed.

This commit is contained in:
zkldi
2021-11-13 09:12:39 +00:00
parent 2cff4acdbf
commit 39d9cfd691
@@ -99,10 +99,15 @@ async function GenericUpsert<T>(
}
const syncInstructions: SyncInstructions[] = [
{
pattern: /^charts-(usc|bms)$/u,
handler: (charts: ChartDocument[], collection: ICollection<ChartDocument>, logger) =>
GenericUpsert(charts, collection, "chartID", logger, false),
},
{
pattern: /^charts-/u,
handler: (charts: ChartDocument[], collection: ICollection<ChartDocument>, logger) =>
GenericUpsert(charts, collection, "chartID", logger),
GenericUpsert(charts, collection, "chartID", logger, true),
},
{
pattern: /^songs-/u,