Existing username check now working, error box showing and hiding properly, UI tweaks

This commit is contained in:
Nathan Leniz
2015-01-24 12:51:53 -05:00
parent 022b8daddc
commit 4128b3b765
3 changed files with 20 additions and 15 deletions

View File

@ -191,9 +191,11 @@ exports.checkUniqueUsername = function(req, res) {
exports.checkExistingUsername = function(req, res) {
User.count({'profile.username': req.params.username.toLowerCase()}, function (err, data) {
if (data == 1) {
return res.send(false);
} else {
debug('sending false back')
return res.send(true);
} else {
debug('sending true back')
return res.send(false);
}
});
};