Created
January 5, 2020 16:31
-
-
Save ftmoose/1e1bd27f9d4b1fa94b016a33263cb728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userSchema = new Schema({ | |
username: String, | |
picture: { type: String, default: "https://domain.com/some-pic.png" }, | |
googleId: String, | |
facebookId: String | |
}); | |
userSchema.index({ username: 1 }); | |
userSchema.index({ googleId: 1 }); | |
userSchema.index({ facebookId: 1 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment