Merge pull request #568 from coralproject/user-fix

Added privacy fix
This commit is contained in:
Wyatt Johnson
2017-05-05 13:19:59 -06:00
committed by GitHub
+8
View File
@@ -136,6 +136,14 @@ const UserSchema = new mongoose.Schema({
timestamps: {
createdAt: 'created_at',
updatedAt: 'updated_at'
},
toJSON: {
transform: function (doc, ret) {
delete ret.password;
delete ret._id;
delete ret.__v;
}
}
});