mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Upgrade express.js to 4.12
no ref - Fix deprecation warnings
This commit is contained in:
parent
f489cb1fd2
commit
e7246a4ef3
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ var _ = require('lodash'),
|
||||||
module.exports = function (blogApp) {
|
module.exports = function (blogApp) {
|
||||||
var resourceTypes = ['posts', 'authors', 'tags', 'pages'],
|
var resourceTypes = ['posts', 'authors', 'tags', 'pages'],
|
||||||
verifyResourceType = function (req, res, next) {
|
verifyResourceType = function (req, res, next) {
|
||||||
if (!_.contains(resourceTypes, req.param('resource'))) {
|
if (!_.contains(resourceTypes, req.params.resource)) {
|
||||||
return res.sendStatus(404);
|
return res.sendStatus(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ module.exports = function (blogApp) {
|
||||||
});
|
});
|
||||||
|
|
||||||
blogApp.get('/sitemap-:resource.xml', verifyResourceType, function (req, res) {
|
blogApp.get('/sitemap-:resource.xml', verifyResourceType, function (req, res) {
|
||||||
var type = req.param('resource'),
|
var type = req.params.resource,
|
||||||
page = 1,
|
page = 1,
|
||||||
siteMapXml = getResourceSiteMapXml(type, page);
|
siteMapXml = getResourceSiteMapXml(type, page);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
"compression": "1.2.2",
|
"compression": "1.2.2",
|
||||||
"connect-slashes": "1.3.0",
|
"connect-slashes": "1.3.0",
|
||||||
"downsize": "0.0.8",
|
"downsize": "0.0.8",
|
||||||
"express": "4.10.6",
|
"express": "4.12.0",
|
||||||
"express-hbs": "0.7.11",
|
"express-hbs": "0.7.11",
|
||||||
"extract-zip": "1.0.3",
|
"extract-zip": "1.0.3",
|
||||||
"fs-extra": "0.13.0",
|
"fs-extra": "0.13.0",
|
||||||
|
|
Loading…
Add table
Reference in a new issue