|
|
@ -9,7 +9,7 @@ var nconf = require('nconf'),
|
|
|
|
PluginRoutes = function(app) {
|
|
|
|
PluginRoutes = function(app) {
|
|
|
|
app.get('/plugins/fireHook', function(req, res) {
|
|
|
|
app.get('/plugins/fireHook', function(req, res) {
|
|
|
|
// GET = filter
|
|
|
|
// GET = filter
|
|
|
|
Plugins.fireHook('filter:' + req.query.hook, req.query.args, function(err, returnData) {
|
|
|
|
plugins.fireHook('filter:' + req.query.hook, req.query.args, function(err, returnData) {
|
|
|
|
if (typeof returnData === 'object') {
|
|
|
|
if (typeof returnData === 'object') {
|
|
|
|
res.json(200, returnData);
|
|
|
|
res.json(200, returnData);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -44,4 +44,4 @@ var nconf = require('nconf'),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = PluginRoutes;
|
|
|
|
module.exports = PluginRoutes;
|
|
|
|