Comparing version 0.16.1 to 0.16.2
@@ -8,4 +8,3 @@ "use strict"; | ||
//@ts-ignore | ||
// console.log(res.originalBody); | ||
if (Efesto.mongoIdParser) { | ||
if (Efesto.mongoIdParser && !res.headersSent) { | ||
//@ts-ignore | ||
@@ -12,0 +11,0 @@ result = idFieldAdder(res.originalBody); |
@@ -140,4 +140,4 @@ "use strict"; | ||
}); | ||
const jsonParserMiddleware = (req, res, next) => { | ||
if (Efesto.mongoIdParser) { | ||
const jsonParserMiddleware = (error, req, res, next) => { | ||
if (Efesto.mongoIdParser && !error && !res.headersSent) { | ||
const originalJson = res.json; | ||
@@ -154,3 +154,2 @@ // Override res.json to capture the response body | ||
res.originalJson = originalJson; | ||
// originalJson.call(this, body); | ||
}; | ||
@@ -157,0 +156,0 @@ } |
{ | ||
"name": "efesto", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173747
1697