mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Fixing clean Up and added option to show which products arent used in a list
This commit is contained in:
parent
c6c5951d16
commit
680f7c614d
6 changed files with 71 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue