launch-editor-middleware
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -0,1 +1,2 @@ | ||
const url = require('url') | ||
const launch = require('launch-editor') | ||
@@ -5,5 +6,6 @@ | ||
return function launchEditorMiddleware (req, res, next) { | ||
const { file } = req.query | ||
const { file } = url.parse(req.url, true).query || {} | ||
if (!file) { | ||
res.status(500).end(`launch-editor-middleware: required query param "file" is missing.`) | ||
res.statusCode = 500 | ||
res.end(`launch-editor-middleware: required query param "file" is missing.`) | ||
} else { | ||
@@ -10,0 +12,0 @@ launch(file, specifiedEditor, onErrorCallback) |
{ | ||
"name": "launch-editor-middleware", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "express middleware for launching editor", | ||
@@ -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
1028
14