delete masters _id

This commit is contained in:
RustamRu 2025-01-12 11:12:24 +03:00
parent e7451aea5b
commit 558245f876

View File

@ -11,6 +11,9 @@ const schema = new Schema({
schema.set('toJSON', {
virtuals: true,
versionKey: false,
transform(_doc, ret) {
delete ret._id;
}
})
schema.virtual('id').get(function () {