scrub imported games and their analysis
parent
4bda5ec111
commit
5b72f1db36
|
@ -79,6 +79,14 @@ scrub('game5')(c =>
|
|||
})
|
||||
);
|
||||
|
||||
scrub('game5')(c => {
|
||||
const importedIds = c.distinct('_id', { 'pgni.user': userId });
|
||||
if (importedIds.length) {
|
||||
c.remove({ 'pgni.user': userId });
|
||||
scrub('analysis2')(a => a.remove({ _id: { $in: importedIds } }));
|
||||
}
|
||||
});
|
||||
|
||||
deleteAll('history3', '_id');
|
||||
|
||||
deleteAll('image', 'createdBy');
|
||||
|
|
Loading…
Reference in New Issue