@loomcore/api 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,9 @@ function convertStringsToObjectIds(entity, schema) {
67
67
  if (!entity)
68
68
  return entity;
69
69
  const clone = _.cloneDeep(entity);
70
+ if (clone._id && typeof clone._id === 'string' && entityUtils.isValidObjectId(clone._id)) {
71
+ clone._id = new ObjectId(clone._id);
72
+ }
70
73
  const processEntity = (obj, subSchema, path = []) => {
71
74
  if (!obj || typeof obj !== 'object')
72
75
  return obj;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/api",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "private": false,
5
5
  "description": "Loom Core Api - An opinionated Node.js api using Typescript, Express, and MongoDb",
6
6
  "scripts": {