framework-do-dede 0.0.25 → 0.0.26

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,10 +16,10 @@ class RequestData {
16
16
  class UseCaseHandler {
17
17
  static load(useCaseClass, request) {
18
18
  const instance = Registry.classLoader(useCaseClass);
19
- const auth = Reflect.getMetadata("auth", useCaseClass);
19
+ const authProperty = Reflect.getMetadata("auth", useCaseClass.prototype.constructor);
20
20
  const context = request;
21
- if (auth && context?.middlewareData) {
22
- instance[auth] = context.middlewareData[auth];
21
+ if (authProperty && context?.middlewareData?.[authProperty]) {
22
+ instance[authProperty] = { ...context.middlewareData[authProperty] };
23
23
  }
24
24
  return instance;
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework-do-dede",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",