Compare commits

...

3 Commits

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