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