Add methods to models for archived entities

This commit is contained in:
John R. Supplee 2021-01-11 18:18:26 +02:00
parent 01bd94d2b3
commit bbcb236a46
5 changed files with 115 additions and 44 deletions

View file

@ -328,6 +328,16 @@ Lists.mutations({
},
});
Lists.archivedLists = () => {
return Lists.find({ archived: true });
};
Lists.archivedListIds = () => {
return Lists.archivedLists().map(list => {
return list._id;
});
};
Meteor.methods({
applyWipLimit(listId, limit) {
check(listId, String);