Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -4,13 +4,15 @@ const UserSchema = new mongoose.Schema({ | ... | @@ -4,13 +4,15 @@ const UserSchema = new mongoose.Schema({ |
4 | name: { | 4 | name: { |
5 | type: String, | 5 | type: String, |
6 | trim: true, | 6 | trim: true, |
7 | - sparse: true | 7 | + sparse: true, |
8 | + index: true | ||
8 | }, | 9 | }, |
9 | email: { | 10 | email: { |
10 | type: String, | 11 | type: String, |
11 | trim: true, | 12 | trim: true, |
12 | unique: true, | 13 | unique: true, |
13 | - sparse: true | 14 | + sparse: true, |
15 | + index: true | ||
14 | }, | 16 | }, |
15 | avatarUrl: String, | 17 | avatarUrl: String, |
16 | githubId: { | 18 | githubId: { | ... | ... |
-
Please register or login to post a comment