remove old check

main
Rosalina 2023-03-02 11:39:10 -05:00
parent 169526974b
commit cdffe0278d
No known key found for this signature in database
1 changed files with 1 additions and 6 deletions

View File

@ -31,18 +31,13 @@ export class MongoDBExporter implements GameExporter {
const collection = type === "CoopInfo" ? this.jobsCollection : this.battlesCollection; const collection = type === "CoopInfo" ? this.jobsCollection : this.battlesCollection;
for (const id of list) { for (const id of list) {
// countOldStorage can be removed later eventually when all old documents
// are gone from SplatNet 3
const countOldStorage = await collection.countDocuments({
"splatNetData.id": id,
});
const uniqueId = MongoDBExporter.getGameId(id); const uniqueId = MongoDBExporter.getGameId(id);
const countNewStorage = await collection.countDocuments({ const countNewStorage = await collection.countDocuments({
gameId: uniqueId, gameId: uniqueId,
}); });
if (countOldStorage === 0 && countNewStorage === 0) { if (countNewStorage === 0) {
out.push(id); out.push(id);
} }
} }