diff --git a/src/routes/api.js b/src/routes/api.js index f2b4710c72..78823bd9bd 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -1,12 +1,14 @@ var user = require('./../user.js'), auth = require('./authentication.js'), topics = require('./../topics.js'), + posts = require('./../posts.js'), categories = require('./../categories.js'), utils = require('./../../public/src/utils.js'), pkg = require('../../package.json'), meta = require('./../meta.js'), path = require('path'), - nconf = require('nconf'); + nconf = require('nconf'), + async = require('async'); (function (Api) { @@ -48,7 +50,7 @@ var user = require('./../user.js'), }); } - require('async').each(data.categories, iterator, function (err) { + async.each(data.categories, iterator, function (err) { data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : 'none'; data.motd = require('marked')(meta.config.motd || "# NodeBB v " + pkg.version + "\nWelcome to NodeBB, the discussion platform of the future.\n\n
 Get NodeBB  Fork us on Github  @dcplabs
"); res.json(data);