Merge pull request #568 from coralproject/user-fix

Added privacy fix
This commit is contained in:
Wyatt Johnson
2017-05-08 13:12:21 -07:00
committed by gaba
+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;
}
}
});