Skip to content
This repository was archived by the owner on Feb 13, 2018. It is now read-only.

Commit 0dab2db

Browse files
committed
lint
1 parent 47ec34d commit 0dab2db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const upload = multer({
8080
/*
8181
* Uploads a file
8282
*/
83-
app.post('/files', upload.single('document'), (req, res) => {
83+
app.post('/files', upload.single('document'), (req, res, next) => {
8484
if (!req.file && !req.file.path) {
8585
return next({
8686
error: 'Missing required parameter: file',

config/error-handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = function (app) {
2929
app.use((err, req, res, next) => {
3030
const error = {
3131
// node.js will throw if the http status code is invalid
32-
code: typeof err.code === 'number' && 100<=err.code<=999 ? err.code : 500,
32+
code: typeof err.code === 'number' && err.code >= 100 && err.code <= 999 ? err.code : 500,
3333
error: err.error || err.message,
3434
};
3535
res.status(error.code).json(error);

0 commit comments

Comments
 (0)