fix waterfall

Signed-off-by: Dustin Falgout <dustin@falgout.us>
v1.18.x
Dustin Falgout 9 years ago
parent 0e5830d6f2
commit 17e5d72815

@ -202,6 +202,7 @@ apiController.getUserByUsername = function (req, res, next) {
function(next) {
user.getUidByUsername(username, next);
},
function(uid, next) {
async.parallel({
userData: async.apply(user.getUserData, uid),
settings: async.apply(user.getSettings, uid)
@ -213,8 +214,8 @@ apiController.getUserByUsername = function (req, res, next) {
results.userData.fullname = results.settings.showfullname ? results.userData.fullname : undefined;
res.json(results.userData);
})
});
}
], next);
};
@ -226,6 +227,7 @@ apiController.getUserByEmail = function (req, res, next) {
function(next) {
user.getUidByEmail(email, next);
},
function(uid, next) {
async.parallel({
userData: async.apply(user.getUserData, uid),
settings: async.apply(user.getSettings, uid)
@ -237,8 +239,8 @@ apiController.getUserByEmail = function (req, res, next) {
results.userData.fullname = results.settings.showfullname ? results.userData.fullname : undefined;
res.json(results.userData);
})
});
}
], next);
};

Loading…
Cancel
Save