c2-http 1.0.173 → 1.0.176

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.
@@ -2,7 +2,7 @@ import { RequestHandler, Router } from "express";
2
2
  import { NormalizePathEntry } from "express-prom-bundle";
3
3
  import { IControllerOptions } from "./IControllerOptions";
4
4
  export interface ISingleRouteParam {
5
- method: "get" | "post" | "patch" | "delete";
5
+ method: "get" | "post" | "patch" | "delete" | "put";
6
6
  uri: string;
7
7
  middlewareAuthorization?: RequestHandler;
8
8
  middlewares?: RequestHandler[];
@@ -70,7 +70,7 @@ function HttpDispatchHandling(target, methodName, descriptor) {
70
70
  console.error(error);
71
71
  response
72
72
  .status(error.status || http_status_1.INTERNAL_SERVER_ERROR)
73
- .json({ message: error.message, detail: error.detail?.data });
73
+ .json({ message: error.message, detail: error.detail });
74
74
  }
75
75
  };
76
76
  return descriptor;
@@ -88,7 +88,7 @@ function HttpDispatchHandlingAdmin(target, methodName, descriptor) {
88
88
  console.error(error);
89
89
  response
90
90
  .status(error.status || http_status_1.INTERNAL_SERVER_ERROR)
91
- .json({ message: error.message, detail: error.detail?.data });
91
+ .json({ message: error.message, detail: error.detail });
92
92
  }
93
93
  };
94
94
  return descriptor;
@@ -111,7 +111,7 @@ function HttpDispatchDownload(target, methodName, descriptor) {
111
111
  console.error(error);
112
112
  response
113
113
  .status(error.status || http_status_1.INTERNAL_SERVER_ERROR)
114
- .json({ message: error.message, detail: error.detail?.data });
114
+ .json({ message: error.message, detail: error.detail });
115
115
  }
116
116
  };
117
117
  return descriptor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-http",
3
- "version": "1.0.173",
3
+ "version": "1.0.176",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://cabralsilva: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@github.com/cabralsilva/c2-http.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",