Skip to content

Commit

Permalink
fix: allow email field that are null (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dun-sin authored Aug 12, 2024
1 parent 910582d commit 90c289f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/models/UserModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ const UserSchema = new Schema(
}
);

UserSchema.index({ loginId: 1 }, { unique: true });
UserSchema.index({ loginId: 1, email: 1 }, { unique: true, sparse: true });

module.exports = model('User', UserSchema);

0 comments on commit 90c289f

Please sign in to comment.