File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const UserSchema = new Schema({
2323} ) ;
2424
2525/** Hash the password before saving it to the database*/
26- UserSchema . pre ( 'save' , ( next ) => {
26+ UserSchema . pre ( 'save' , function ( next ) {
2727 /** this refers to the user passed as argument to the save method in /routes/user*/
2828 const user = this ;
2929 /** only hash the password if it has been modified or its new */
@@ -58,4 +58,4 @@ UserSchema.methods.gravatar = (size) => {
5858 return 'https://gravatar.com/avatar/' + md5 + '?s=' + size + '&d=retro' ;
5959} ;
6060/** compiling our schema into a model object - a class that constructs documents in mongoose */
61- module . exports = mongoose . model ( 'User' , UserSchema ) ;
61+ module . exports = mongoose . model ( 'User' , UserSchema ) ;
You can’t perform that action at this time.
0 commit comments