Skip to content

Commit e48acdf

Browse files
committed
Use Unique Property in Model instead of doing in DB
1 parent 6891212 commit e48acdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node-login/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Schema = mongoose.Schema;
77
const userSchema = mongoose.Schema({
88

99
name : String,
10-
email : String,
10+
email : {type: String, unique: true},
1111
hashed_password : String,
1212
created_at : String,
1313
temp_password : String,

0 commit comments

Comments
 (0)