request-guardian 1.0.6 → 1.0.8

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.
Files changed (3) hide show
  1. package/README.md +5 -2
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -70,7 +70,6 @@ app.get('/', (req, res) => {
70
70
  // handle request
71
71
  });
72
72
 
73
- // use request-guardian middleware for a specific route
74
73
  app.post('/users', (req, res) => {
75
74
  // handle validated request
76
75
  });
@@ -80,4 +79,8 @@ app.listen(3000, () => {
80
79
  });
81
80
  ```
82
81
 
83
- If no validation rules are found for the current route, `request-guardian` will simply pass the request to the next middleware function in the stack.
82
+ If no validation rules are found for the current route, `request-guardian` will simply pass the request to the next middleware function in the stack.
83
+
84
+ ## Keywords
85
+
86
+ express validator validation validate sanitize sanitization xss
package/index.js CHANGED
@@ -2,7 +2,7 @@ const { validationResult, ValidationChain } = require('express-validator');
2
2
 
3
3
  async function validate(req, res, next) {
4
4
  try {
5
- let validations = require('../utils/validationss')[req.path];
5
+ let validations = require('../utils/validations/index.js')[req.path];
6
6
  if (!validations) return next();
7
7
  for (let validation of validations) {
8
8
  const result = await validation.run(req);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "request-guardian",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {