micro-fame
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "micro-fame", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "rest api framework for micro", | ||
@@ -40,2 +40,4 @@ "main": "src/index.js", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"form-data": "^2.3.1", | ||
"formidable": "^1.1.1", | ||
"nodemon": "^1.12.1", | ||
@@ -42,0 +44,0 @@ "then-sleep": "^1.0.1", |
@@ -7,3 +7,3 @@ const { json } = require('micro'); | ||
const defaultWrapper = ({ method, args, argsGetter = 'params', fnArgsNames }) => { | ||
const defaultWrapper = ({ method, args, argsGetter = 'params', fnArgsNames, ignoreJSONParsing = false }) => { | ||
assert(VALID_ARGS_GETTER.indexOf(argsGetter) > -1, | ||
@@ -17,3 +17,3 @@ 'Invalid argsGetter. Valid values are `params`, `query`, `body`'); | ||
const isPost = req.method.toLowerCase() === 'post'; | ||
if (isPost) { | ||
if (!ignoreJSONParsing && isPost) { | ||
req.body = await json(req, { limit: REQ_BODY_LIMIT, encoding: REQ_BODY_ENCODING }); | ||
@@ -20,0 +20,0 @@ } |
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
154789
21