|
|
|
@ -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);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|