Merge pull request #1715 from coralproject/custom-displayname

Search - Display Name
This commit is contained in:
Kim Gardner
2018-06-29 14:01:40 -04:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -110,6 +110,13 @@ const getUsersByQuery = async (
},
},
},
// Search by the displayName metadata field.
{
'metadata.displayName': {
$regex,
},
},
],
});
}
+9
View File
@@ -235,6 +235,15 @@ User.index({
created_at: -1,
});
User.index(
{
'metadata.displayName': 1,
},
{
sparse: true,
}
);
// This query is executed often, to count the number of flagged accounts with
// usernames.
User.index({