Added privacy fix

This commit is contained in:
Wyatt Johnson
2017-05-05 13:14:34 -06:00
committed by gaba
parent 28920eb357
commit 607ab6c0d6
+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;
}
}
});