mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
@@ -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