delete masters _id
This commit is contained in:
parent
e7451aea5b
commit
558245f876
@ -11,6 +11,9 @@ const schema = new Schema({
|
|||||||
schema.set('toJSON', {
|
schema.set('toJSON', {
|
||||||
virtuals: true,
|
virtuals: true,
|
||||||
versionKey: false,
|
versionKey: false,
|
||||||
|
transform(_doc, ret) {
|
||||||
|
delete ret._id;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
schema.virtual('id').get(function () {
|
schema.virtual('id').get(function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user