vovk 3.0.0-draft.268 → 3.0.0-draft.269

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.
package/cjs/VovkApp.js CHANGED
@@ -125,7 +125,7 @@ class VovkApp {
125
125
  const handlers = {};
126
126
  const headersList = await (0, headers_1.headers)();
127
127
  const xMeta = headersList.get('x-meta');
128
- const meta = xMeta ? JSON.parse(xMeta) : {};
128
+ const meta = xMeta && JSON.parse(xMeta);
129
129
  if (meta)
130
130
  (0, reqMeta_1.default)(req, { header: meta });
131
131
  controllers.forEach((staticMethods, controller) => {
@@ -33,6 +33,7 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
33
33
  originalMethod.schema = schema;
34
34
  originalMethod.fn = originalMethod._sourceMethod?.fn;
35
35
  originalMethod.models = originalMethod._sourceMethod?.models;
36
+ originalMethod._sourceMethod.wrapper = originalMethod;
36
37
  controller._handlers = {
37
38
  ...controller._handlers,
38
39
  [propertyKey]: {
package/mjs/VovkApp.js CHANGED
@@ -125,7 +125,7 @@ class VovkApp {
125
125
  const handlers = {};
126
126
  const headersList = await (0, headers_1.headers)();
127
127
  const xMeta = headersList.get('x-meta');
128
- const meta = xMeta ? JSON.parse(xMeta) : {};
128
+ const meta = xMeta && JSON.parse(xMeta);
129
129
  if (meta)
130
130
  (0, reqMeta_1.default)(req, { header: meta });
131
131
  controllers.forEach((staticMethods, controller) => {
@@ -33,6 +33,7 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
33
33
  originalMethod.schema = schema;
34
34
  originalMethod.fn = originalMethod._sourceMethod?.fn;
35
35
  originalMethod.models = originalMethod._sourceMethod?.models;
36
+ originalMethod._sourceMethod.wrapper = originalMethod;
36
37
  controller._handlers = {
37
38
  ...controller._handlers,
38
39
  [propertyKey]: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.268",
3
+ "version": "3.0.0-draft.269",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",