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

@ -283,6 +283,16 @@ Swimlanes.mutations({
},
});
Swimlanes.archivedSwimlanes = () => {
return Swimlanes.find({ archived: true });
};
Swimlanes.archivedSwimlaneIds = () => {
return Swimlanes.archivedSwimlanes().map(swim => {
return swim._id;
});
};
Swimlanes.hookOptions.after.update = { fetchPrevious: false };
if (Meteor.isServer) {