Moved /p/:pad and /p/:pad/timeslider static html to specialpages

This commit is contained in:
Egil Moeller 2012-02-24 20:53:42 +01:00
parent 752dc5ca26
commit e3770e42b6
2 changed files with 15 additions and 14 deletions

View File

@ -254,20 +254,6 @@ async.waterfall([
});
});
//serve pad.html under /p
app.get('/p/:pad', function(req, res, next)
{
var filePath = path.normalize(__dirname + "/../static/pad.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
});
//serve timeslider.html under /p/$padname/timeslider
app.get('/p/:pad/timeslider', function(req, res, next)
{
var filePath = path.normalize(__dirname + "/../static/timeslider.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
});
//serve timeslider.html under /p/$padname/timeslider
app.get('/p/:pad/:rev?/export/:type', function(req, res, next)
{

View File

@ -30,4 +30,19 @@ exports.expressServer = function (hook_name, args, cb) {
}
});
});
//serve pad.html under /p
args.app.get('/p/:pad', function(req, res, next)
{
var filePath = path.normalize(__dirname + "/../static/pad.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
});
//serve timeslider.html under /p/$padname/timeslider
args.app.get('/p/:pad/timeslider', function(req, res, next)
{
var filePath = path.normalize(__dirname + "/../static/timeslider.html");
res.sendfile(filePath, { maxAge: exports.maxAge });
});
}