mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
added new hook, filter:controllers.topic.get
This commit is contained in:
@@ -11,6 +11,7 @@ var topicsController = {},
|
||||
topics = require('../topics'),
|
||||
posts = require('../posts'),
|
||||
privileges = require('../privileges'),
|
||||
plugins = require('../plugins'),
|
||||
helpers = require('./helpers'),
|
||||
utils = require('../../public/src/utils');
|
||||
|
||||
@@ -120,7 +121,9 @@ topicsController.get = function(req, res, next) {
|
||||
topicData.posts.splice(0, 1);
|
||||
}
|
||||
|
||||
next(null, topicData);
|
||||
plugins.fireHook('filter:controllers.topic.get', topicData, function(err, topicData) {
|
||||
next(null, topicData);
|
||||
});
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
|
||||
Reference in New Issue
Block a user