Merge pull request #568 from coralproject/user-fix

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