mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Fix res.send (migrate to express v3)
This commit is contained in:
parent
ff7cf991c9
commit
71579d1478
5 changed files with 8 additions and 12 deletions
|
@ -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('Such a padname is forbidden', 404);
|
||||
res.send(404, '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('You should be redirected to <a href="' + real_url + '">' + real_url + '</a>', 302);
|
||||
res.send(302, 'You should be redirected to <a href="' + real_url + '">' + real_url + '</a>');
|
||||
}
|
||||
//the pad id was fine, so just render it
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue