mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
improve username autocomplete
This commit is contained in:
@@ -313,6 +313,8 @@ api.resetPassword = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await user.save();
|
await user.save();
|
||||||
|
} else {
|
||||||
|
let user = await User.findOne({ 'auth.google.email': email }).exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
res.respond(200, {}, res.t('passwordReset'));
|
res.respond(200, {}, res.t('passwordReset'));
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ api.getUsernameAutocompletes = {
|
|||||||
.find(recentChatQuery)
|
.find(recentChatQuery)
|
||||||
.select(['profile.name', 'contributor', 'auth.local.username'])
|
.select(['profile.name', 'contributor', 'auth.local.username'])
|
||||||
.sort({'auth.timestamps.loggedin': -1})
|
.sort({'auth.timestamps.loggedin': -1})
|
||||||
.limit(5 - members.length)
|
.limit(5)
|
||||||
.exec();
|
.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user