express-rest-api-generator
Advanced tools
Comparing version 1.3.0 to 1.3.1
const bodyParser = require('body-parser'); | ||
const log = require('debug')('rest:'); // eslint-disable-line | ||
const log = require('debug')('bot:app:rest:'); // eslint-disable-line | ||
const { slugify, toNum, omit } = require('./helpers'); | ||
@@ -86,5 +86,7 @@ | ||
if (!keys.length) return next(); | ||
log(req[this.key]); | ||
req[this.key] = req[this.key] | ||
.map(wrapper => wrapper | ||
.map(collection => omit(collection._doc, keys))) | ||
.map(mixed => Array.isArray(mixed) // eslint-disable-line | ||
? mixed.map(collection => omit(collection._doc, keys)) | ||
: omit(mixed._doc, keys)) | ||
.shift(); | ||
@@ -91,0 +93,0 @@ return next(); |
{ | ||
"name": "express-rest-api-generator", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "express mountable app for mongoose routes with generators for mongoose model embedded statics", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
9060
258