From 523b8457e68b0ccb45256d965f5d8491a6cd5e0c Mon Sep 17 00:00:00 2001 From: Fillerino Date: Sun, 18 Jun 2017 11:43:57 +0200 Subject: [PATCH] Fixed two variable names to match old es5 var-names. --- routes/serve-routes.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/routes/serve-routes.js b/routes/serve-routes.js index 8c5b5930..8bf7b738 100644 --- a/routes/serve-routes.js +++ b/routes/serve-routes.js @@ -1,16 +1,17 @@ const errorHandlers = require('../helpers/libraries/errorHandlers.js') const serveController = require('../controllers/serveController.js') -function serveFile ({ fileType, filePath }, res) { +function serveFile ({ file_type, file_path }, res) { // set default options const options = { headers: { 'X-Content-Type-Options': 'nosniff', - 'Content-Type' : fileType, + 'Content-Type' : file_type, }, } // adjust default options as needed - switch (fileType) { + // eslint-disable-next-line camelcase + switch (file_type) { case 'image/jpeg': break case 'image/gif': @@ -25,7 +26,7 @@ function serveFile ({ fileType, filePath }, res) { break } // send file - res.status(200).sendFile(filePath, options) + res.status(200).sendFile(file_path, options) } module.exports = (app, ua, googleAnalyticsId) => {