fire hooks for flag update

v1.18.x
Julian Lam 8 years ago
parent 8f916343f0
commit 6c04e393b5

@ -470,9 +470,13 @@ Flags.update = function (flagId, uid, changeset, callback) {
// Save new object to db (upsert)
tasks.push(async.apply(db.setObject, 'flag:' + flagId, changeset));
// Append history
tasks.push(async.apply(Flags.appendHistory, flagId, uid, changeset));
// Fire plugin hook
tasks.push(async.apply(plugins.fireHook, 'action:flag.update', { changeset: changeset, uid: uid }));
async.parallel(tasks, function (err, data) {
return next(err);
});

Loading…
Cancel
Save