Skip to content

Commit f59c0d0

Browse files
committed
Minor cleanup in Chapter 8 user model
1 parent 4e9c641 commit f59c0d0

File tree

1 file changed

+1
-3
lines changed
  • Chapter_08/learn-about-me/models

1 file changed

+1
-3
lines changed

Chapter_08/learn-about-me/models/user.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ var userSchema = mongoose.Schema({
88
password: { type: String, required: true },
99
createdAt: { type: Date, default: Date.now },
1010
displayName: String,
11-
bio: String,
11+
bio: String
1212
});
1313

1414
var noop = function() {};
1515

1616
userSchema.pre("save", function(done) {
17-
1817
var user = this;
1918

2019
if (!user.isModified("password")) {
@@ -29,7 +28,6 @@ userSchema.pre("save", function(done) {
2928
done();
3029
});
3130
});
32-
3331
});
3432

3533
userSchema.methods.checkPassword = function(guess, done) {

0 commit comments

Comments
 (0)