Fixing clean Up and added option to show which products arent used in a list

This commit is contained in:
Brian McGonagill 2025-08-09 07:21:46 -05:00
parent c6c5951d16
commit 680f7c614d
6 changed files with 71 additions and 10 deletions

View file

@ -63,5 +63,15 @@ Meteor.methods({
}
return await Products.removeAsync({ _id: prodId });
},
async 'clean.Products' () {
if (!this.userId) {
throw new Meteor.Error('You are not allowed to delete products. Make sure you are logged in with valid user credentials.');
}
// first we need to find potential duplicate products
// next we need to see which of those are on incomplete lists
// Then we'll update those to use the main products ID instead
// finally we'll delete the duplicates
}
});