improve username autocomplete

This commit is contained in:
Phillip Thelen
2019-04-22 09:07:28 +02:00
parent 51f66af320
commit 2dca2148f4
2 changed files with 3 additions and 1 deletions

View File

@@ -313,6 +313,8 @@ api.resetPassword = {
});
await user.save();
} else {
let user = await User.findOne({ 'auth.google.email': email }).exec();
}
res.respond(200, {}, res.t('passwordReset'));

View File

@@ -67,7 +67,7 @@ api.getUsernameAutocompletes = {
.find(recentChatQuery)
.select(['profile.name', 'contributor', 'auth.local.username'])
.sort({'auth.timestamps.loggedin': -1})
.limit(5 - members.length)
.limit(5)
.exec();
}