Main flow implemented

This commit is contained in:
Angelo Gallarello 2018-08-16 00:32:31 +02:00
parent 9b0eb0a9f1
commit 6828ccd7f1
9 changed files with 100 additions and 15 deletions

View file

@ -60,13 +60,13 @@ Activities.before.insert((userId, doc) => {
Activities.after.insert((userId, doc) => {
const activity = Activities._transform(doc);
const matchedTriggers = Triggers.find(activity);
if(matchedTriggers.count() > 0){
const card = activity.card();
Cards.direct.update({_id: card._id},{$set: {title: "ciaooo"}});
}
RulesHelper.executeRules(activity);
});
if (Meteor.isServer) {
// For efficiency create indexes on the date of creation, and on the date of
// creation in conjunction with the card or board id, as corresponding views