c2-http 1.0.162 → 1.0.164

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.
@@ -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.162",
3
+ "version": "1.0.164",
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>",