From 61863a69fe7accf6a51494e708b7877842f825bf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 13 Nov 2014 17:04:04 -0500 Subject: [PATCH] sendfile is deprecated --- src/middleware/middleware.js | 2 +- src/routes/meta.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 422805a391..e9f2b0eaa6 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -437,7 +437,7 @@ middleware.routeTouchIcon = function(req, res) { if (meta.config['brand:logo'] && validator.isURL(meta.config['brand:logo'])) { return res.redirect(meta.config['brand:logo']); } else { - return res.sendfile(path.join(__dirname, '../../public', meta.config['brand:logo'] || '/logo.png'), { + return res.sendFile(path.join(__dirname, '../../public', meta.config['brand:logo'] || '/logo.png'), { maxAge: app.enabled('cache') ? 5184000000 : 0 }); } diff --git a/src/routes/meta.js b/src/routes/meta.js index f2cf45168b..fd54cae2d7 100644 --- a/src/routes/meta.js +++ b/src/routes/meta.js @@ -23,7 +23,7 @@ function sendStylesheet(req, res, next) { } function sendACPStylesheet(req, res, next) { - res.type('text/css').status(200).send(meta.css.acpCache); + res.type('text/css').status(200).send(meta.css.acpCache); } function setupPluginSourceMapping(app) { @@ -40,7 +40,7 @@ function setupPluginSourceMapping(app) { routes.forEach(function(route) { mapping = '/' + route.split(path.sep).slice(prefix).join('/'); app.get(mapping, function(req, res) { - res.type('text/javascript').sendfile(route); + res.type('text/javascript').sendFile(route); }); }); }