fix case in search

This commit is contained in:
barisusakli
2015-05-23 16:16:05 -04:00
parent 63489457fe
commit 5ce617ca5a
2 changed files with 3 additions and 0 deletions

View File

@@ -1147,6 +1147,8 @@ var async = require('async'),
return Groups.getMembers(data.groupName, 0, -1, callback);
}
query = query.toLowerCase();
async.waterfall([
function(next) {
Groups.getMembers(data.groupName, 0, -1, next);

View File

@@ -77,6 +77,7 @@ module.exports = function(User) {
if (!query) {
return callback(null, []);
}
query = query.toLowerCase();
var min = query;
var max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1);