Merge pull request 'delete masters _id' (#60) from feature/arm-master-id into master

Reviewed-on: #60
This commit is contained in:
Primakov Alexandr Alexandrovich 2025-01-13 17:26:46 +03:00
commit b9edd0091c

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 () {