We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e7c98c commit 09105b7Copy full SHA for 09105b7
server/models/Oauth-model.ts
@@ -8,11 +8,10 @@ interface UserDocument extends Document {
8
9
const userSchema = new mongoose.Schema<UserDocument>({
10
username: { type: String },
11
- githubId: { type: String, unique: true },
12
- googleId: { type: String, unique: true }
+ githubId: { type: String }, // removed unique constraint because you can have null values.
+ googleId: { type: String } // unique:true
13
});
14
15
const User = mongoose.model<UserDocument>('OauthUsers', userSchema);
16
17
-
18
export default User;
0 commit comments