@aeriajs/core 0.0.122 → 0.0.123

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.
@@ -95,11 +95,11 @@ const insert = async (payload, context, options) => {
95
95
  code: types_1.ACError.ResourceNotFound,
96
96
  });
97
97
  }
98
- const result = (0, common_1.throwIfError)(await (0, index_js_1.traverseDocument)(doc, context.description, {
98
+ const result = (0, index_js_1.fill)((0, common_1.throwIfError)(await (0, index_js_1.traverseDocument)(doc, context.description, {
99
99
  getters: true,
100
100
  fromProperties: true,
101
101
  recurseReferences: true,
102
- }));
102
+ })), context.description);
103
103
  return types_1.Result.result(result);
104
104
  };
105
105
  exports.insert = insert;
@@ -2,7 +2,7 @@
2
2
  import { Result, HTTPStatus, ACError, ValidationErrorCode } from "@aeriajs/types";
3
3
  import { useSecurity } from "@aeriajs/security";
4
4
  import { throwIfError, endpointErrorSchema } from "@aeriajs/common";
5
- import { traverseDocument, normalizeProjection, prepareInsert } from "../../collection/index.mjs";
5
+ import { traverseDocument, normalizeProjection, prepareInsert, fill } from "../../collection/index.mjs";
6
6
  export const insertErrorSchema = () => endpointErrorSchema({
7
7
  httpStatus: [
8
8
  HTTPStatus.UnprocessableContent,
@@ -82,10 +82,10 @@ export const insert = async (payload, context, options) => {
82
82
  code: ACError.ResourceNotFound
83
83
  });
84
84
  }
85
- const result = throwIfError(await traverseDocument(doc, context.description, {
85
+ const result = fill(throwIfError(await traverseDocument(doc, context.description, {
86
86
  getters: true,
87
87
  fromProperties: true,
88
88
  recurseReferences: true
89
- }));
89
+ })), context.description);
90
90
  return Result.result(result);
91
91
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/core",
3
- "version": "0.0.122",
3
+ "version": "0.0.123",
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.122",
44
+ "@aeriajs/builtins": "^0.0.123",
45
45
  "@aeriajs/common": "^0.0.77",
46
46
  "@aeriajs/entrypoint": "^0.0.79",
47
47
  "@aeriajs/http": "^0.0.88",
48
- "@aeriajs/security": "^0.0.122",
48
+ "@aeriajs/security": "^0.0.123",
49
49
  "@aeriajs/types": "^0.0.67",
50
50
  "@aeriajs/validation": "^0.0.80"
51
51
  },