mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Add req
to EJS render args when possible
This makes it possible for EJS templates and `eejsBlock_*` hook functions to access the user's express-session state.
This commit is contained in:
parent
cf43156390
commit
ed5a635f4c
4 changed files with 11 additions and 14 deletions
|
@ -14,13 +14,13 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve index.html under /
|
||||
args.app.get('/', function(req, res)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/index.html"));
|
||||
res.send(eejs.require('ep_etherpad-lite/templates/index.html', {req}));
|
||||
});
|
||||
|
||||
//serve javascript.html
|
||||
args.app.get('/javascript', function(req, res)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/javascript.html"));
|
||||
res.send(eejs.require('ep_etherpad-lite/templates/javascript.html'), {req});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue