@aeriajs/core 0.0.108 → 0.0.109

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.
@@ -72,7 +72,7 @@ const insert = async (payload, context, options) => {
72
72
  }
73
73
  let doc;
74
74
  if (context.collection.originalFunctions.get) {
75
- doc = await context.collection.originalFunctions.get({
75
+ doc = (0, common_1.throwIfError)(await context.collection.originalFunctions.get({
76
76
  filters: {
77
77
  _id: newId,
78
78
  },
@@ -80,7 +80,7 @@ const insert = async (payload, context, options) => {
80
80
  inherited: true,
81
81
  }, context), {
82
82
  bypassSecurity: true,
83
- });
83
+ }));
84
84
  }
85
85
  else {
86
86
  doc = await context.collection.model.findOne({
@@ -60,7 +60,7 @@ export const insert = async (payload, context, options) => {
60
60
  }
61
61
  let doc;
62
62
  if (context.collection.originalFunctions.get) {
63
- doc = await context.collection.originalFunctions.get({
63
+ doc = throwIfError(await context.collection.originalFunctions.get({
64
64
  filters: {
65
65
  _id: newId
66
66
  }
@@ -68,7 +68,7 @@ export const insert = async (payload, context, options) => {
68
68
  inherited: true
69
69
  }, context), {
70
70
  bypassSecurity: true
71
- });
71
+ }));
72
72
  } else {
73
73
  doc = await context.collection.model.findOne({
74
74
  _id: newId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/core",
3
- "version": "0.0.108",
3
+ "version": "0.0.109",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -41,11 +41,11 @@
41
41
  "mongodb-memory-server": "^9.2.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@aeriajs/builtins": "^0.0.108",
44
+ "@aeriajs/builtins": "^0.0.109",
45
45
  "@aeriajs/common": "^0.0.68",
46
46
  "@aeriajs/entrypoint": "^0.0.70",
47
47
  "@aeriajs/http": "^0.0.79",
48
- "@aeriajs/security": "^0.0.108",
48
+ "@aeriajs/security": "^0.0.109",
49
49
  "@aeriajs/types": "^0.0.60",
50
50
  "@aeriajs/validation": "^0.0.71"
51
51
  },