Compare commits

..

3 Commits

View File

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