refactor: async/await controllers/api

This commit is contained in:
Barış Soner Uşaklı
2019-08-18 19:06:51 -04:00
parent ca7ba9be34
commit 4eaa630b1c
3 changed files with 148 additions and 196 deletions

View File

@@ -37,7 +37,7 @@ module.exports = function (middleware) {
function (next) {
async.parallel({
config: function (next) {
controllers.api.getConfig(req, res, next);
controllers.api.loadConfig(req, next);
},
plugins: function (next) {
plugins.fireHook('filter:middleware.buildHeader', { req: req, locals: res.locals }, next);