@openaddresses/batch-schema 7.0.0 → 7.1.0
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.
- package/CHANGELOG.md +4 -0
- package/lib/middleware.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/middleware.js
CHANGED
|
@@ -110,7 +110,9 @@ export default class Middleware {
|
|
|
110
110
|
return function (req, res, next) {
|
|
111
111
|
const json = res.json;
|
|
112
112
|
res.json = function(obj) {
|
|
113
|
-
|
|
113
|
+
if (res.statusCode === null || res.statusCode === 200) {
|
|
114
|
+
validate(obj);
|
|
115
|
+
}
|
|
114
116
|
|
|
115
117
|
json.call(this, obj);
|
|
116
118
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"root": true,
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"version": "7.
|
|
6
|
+
"version": "7.1.0",
|
|
7
7
|
"description": "Strongly Validated JSON Schema support for address",
|
|
8
8
|
"repository": "git@github.com:openaddresses/batch-schema",
|
|
9
9
|
"author": "ingalls <nick@ingalls.ca>",
|