summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/padurlsanitize.js
diff options
context:
space:
mode:
authorTom Hunkapiller <tom@furycodes.com>2015-04-10 14:10:55 -0500
committerTom Hunkapiller <tom@furycodes.com>2015-04-10 14:18:30 -0500
commitfd1d285a77db1c583be3e42fb1929ecd4dd41633 (patch)
tree8fb338282c941300ff6ec230447fe6faa2ab5fd7 /src/node/hooks/express/padurlsanitize.js
parent6fad2ca39a01dbde3ef9f6ea7384b27d9d14661d (diff)
downloadetherpad-lite-fd1d285a77db1c583be3e42fb1929ecd4dd41633.zip
fix the rest of the deprecation warnings
Diffstat (limited to 'src/node/hooks/express/padurlsanitize.js')
-rw-r--r--src/node/hooks/express/padurlsanitize.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/hooks/express/padurlsanitize.js b/src/node/hooks/express/padurlsanitize.js
index 2aadccdc..94cbe36a 100644
--- a/src/node/hooks/express/padurlsanitize.js
+++ b/src/node/hooks/express/padurlsanitize.js
@@ -7,7 +7,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//ensure the padname is valid and the url doesn't end with a /
if(!padManager.isValidPadId(padId) || /\/$/.test(req.url))
{
- res.send(404, 'Such a padname is forbidden');
+ res.status(404).send('Such a padname is forbidden');
}
else
{
@@ -19,7 +19,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
var query = url.parse(req.url).query;
if ( query ) real_url += '?' + query;
res.header('Location', real_url);
- res.send(302, 'You should be redirected to <a href="' + real_url + '">' + real_url + '</a>');
+ res.status(302).send('You should be redirected to <a href="' + real_url + '">' + real_url + '</a>');
}
//the pad id was fine, so just render it
else