c2-http 1.0.162 → 1.0.165
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.
|
@@ -8,9 +8,9 @@ const c2_util_1 = require("c2-util");
|
|
|
8
8
|
// import moment from "moment";
|
|
9
9
|
class MiddlewareBody {
|
|
10
10
|
config(expressApplication) {
|
|
11
|
-
expressApplication.use(body_parser_1.default.json({ limit: "
|
|
11
|
+
expressApplication.use(body_parser_1.default.json({ limit: "25mb" }));
|
|
12
12
|
expressApplication.use(body_parser_1.default.urlencoded({ limit: "5mb", extended: true }));
|
|
13
|
-
expressApplication.use(body_parser_1.default.text({ limit: "
|
|
13
|
+
expressApplication.use(body_parser_1.default.text({ limit: "25mb" }));
|
|
14
14
|
expressApplication.use((request, response, next) => {
|
|
15
15
|
(0, c2_util_1.log)("LOG_BODY", "Body middleware enabled");
|
|
16
16
|
if (request.body && typeof request.body === "object") {
|
package/dist/model/Controller.js
CHANGED
|
@@ -60,7 +60,7 @@ function HttpDispatchHandling(target, methodName, descriptor) {
|
|
|
60
60
|
const response = args[1];
|
|
61
61
|
try {
|
|
62
62
|
const blockedDate = express_http_context_1.default.get("accountBlockDate");
|
|
63
|
-
if (blockedDate && (0, moment_1.default)().isAfter((0, moment_1.default)(blockedDate))) {
|
|
63
|
+
if (blockedDate && (0, moment_1.default)().isAfter((0, moment_1.default)(blockedDate).endOf("day"))) {
|
|
64
64
|
return response.status(http_status_1.PAYMENT_REQUIRED).end();
|
|
65
65
|
}
|
|
66
66
|
const returnHttp = await originalMethod.apply(this, args);
|
|
@@ -101,7 +101,7 @@ function HttpDispatchDownload(target, methodName, descriptor) {
|
|
|
101
101
|
const [request, response] = args;
|
|
102
102
|
try {
|
|
103
103
|
const blockedDate = express_http_context_1.default.get("accountBlockDate");
|
|
104
|
-
if (blockedDate && (0, moment_1.default)().isAfter((0, moment_1.default)(blockedDate))) {
|
|
104
|
+
if (blockedDate && (0, moment_1.default)().isAfter((0, moment_1.default)(blockedDate).endOf("day"))) {
|
|
105
105
|
return response.status(http_status_1.PAYMENT_REQUIRED).end();
|
|
106
106
|
}
|
|
107
107
|
const [status, data] = await originalMethod.apply(this, args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c2-http",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.165",
|
|
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>",
|