From e7246a4ef34a11b2c509ecd88825a295486d4cf4 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Thu, 26 Feb 2015 08:28:37 +0100 Subject: [PATCH] Upgrade express.js to 4.12 no ref - Fix deprecation warnings --- core/server/data/sitemap/handler.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/server/data/sitemap/handler.js b/core/server/data/sitemap/handler.js index 24c3a34b23..c0dff53958 100644 --- a/core/server/data/sitemap/handler.js +++ b/core/server/data/sitemap/handler.js @@ -6,7 +6,7 @@ var _ = require('lodash'), module.exports = function (blogApp) { var resourceTypes = ['posts', 'authors', 'tags', 'pages'], verifyResourceType = function (req, res, next) { - if (!_.contains(resourceTypes, req.param('resource'))) { + if (!_.contains(resourceTypes, req.params.resource)) { return res.sendStatus(404); } @@ -25,7 +25,7 @@ module.exports = function (blogApp) { }); blogApp.get('/sitemap-:resource.xml', verifyResourceType, function (req, res) { - var type = req.param('resource'), + var type = req.params.resource, page = 1, siteMapXml = getResourceSiteMapXml(type, page); diff --git a/package.json b/package.json index 536442c991..ee2bbc9fc9 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "compression": "1.2.2", "connect-slashes": "1.3.0", "downsize": "0.0.8", - "express": "4.10.6", + "express": "4.12.0", "express-hbs": "0.7.11", "extract-zip": "1.0.3", "fs-extra": "0.13.0",