mirror of
https://github.com/wassname/talk.git
synced 2026-07-09 16:42:30 +08:00
Added privacy fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user