mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 20:52:50 +02:00
fire hooks for flag update
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user