add test for composer fix

This commit is contained in:
Barış Soner Uşaklı
2017-11-23 19:13:43 -05:00
parent 830028b1d5
commit d96674da64
2 changed files with 26 additions and 5 deletions

View File

@@ -8,15 +8,15 @@ var plugins = require('../plugins');
var topics = require('../topics');
var helpers = require('./helpers');
exports.get = function (req, res, next) {
exports.get = function (req, res, callback) {
async.waterfall([
function (_next) {
function (next) {
plugins.fireHook('filter:composer.build', {
req: req,
res: res,
next: next,
next: callback,
templateData: {},
}, _next);
}, next);
},
function (data) {
if (data.templateData.disabled) {
@@ -28,7 +28,7 @@ exports.get = function (req, res, next) {
res.render('compose', data.templateData);
}
},
], next);
], callback);
};
exports.post = function (req, res) {