finish porting to async/away syntax

This commit is contained in:
Matteo Pagliazzi
2015-12-31 11:46:21 +01:00
parent f76c9d025f
commit aebe2fa400
7 changed files with 560 additions and 652 deletions

View File

@@ -56,7 +56,7 @@ api.registerLocal = {
let lowerCaseUsername = username.toLowerCase();
// Search for duplicates using lowercase version of username
let user = User.findOne({$or: [
let user = await User.findOne({$or: [
{'auth.local.email': email},
{'auth.local.lowerCaseUsername': lowerCaseUsername},
]}, {'auth.local': 1}).exec();