2026-04-08 14:28:58 +04:00

8 lines
173 B
JavaScript

'use strict';
module.exports = function addAutoId(schema) {
const _obj = { _id: { auto: true } };
_obj._id[schema.options.typeKey] = 'ObjectId';
schema.add(_obj);
};