c2-http 1.0.139 → 1.0.141
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.
|
@@ -7,9 +7,10 @@ const MiddlewareBody_1 = __importDefault(require("./item/MiddlewareBody"));
|
|
|
7
7
|
const MiddlewareContext_1 = __importDefault(require("./item/MiddlewareContext"));
|
|
8
8
|
const MiddlewareLogRequest_1 = __importDefault(require("./item/MiddlewareLogRequest"));
|
|
9
9
|
const MiddlewareQueryParams_1 = __importDefault(require("./item/MiddlewareQueryParams"));
|
|
10
|
+
const MiddlewareCors_1 = __importDefault(require("./item/MiddlewareCors"));
|
|
10
11
|
class MiddlewareGlobals {
|
|
11
12
|
config(expressApplication) {
|
|
12
|
-
|
|
13
|
+
MiddlewareCors_1.default.config(expressApplication);
|
|
13
14
|
MiddlewareContext_1.default.config(expressApplication);
|
|
14
15
|
MiddlewareBody_1.default.config(expressApplication);
|
|
15
16
|
MiddlewareQueryParams_1.default.config(expressApplication);
|
|
@@ -25,9 +25,11 @@ class MiddlewareCheckTokenFlow {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
await this.checkToken();
|
|
28
|
+
(0, c2_util_1.log)("LOG_CHECK_TOKEN", "Token checked");
|
|
28
29
|
return next();
|
|
29
30
|
}
|
|
30
31
|
catch (error) {
|
|
32
|
+
(0, c2_util_1.log)("LOG_ERROR_CHECK_TOKEN", error);
|
|
31
33
|
response
|
|
32
34
|
.status(error.status || http_status_1.INTERNAL_SERVER_ERROR)
|
|
33
35
|
.json({ message: error.message, detail: error.detail?.data });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c2-http",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.141",
|
|
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>",
|