Upgrade express.js to 4.12
no ref - Fix deprecation warnings
This commit is contained in:
parent
f489cb1fd2
commit
e7246a4ef3
@ -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);
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user