etherpad-lite/src/node/hooks/express/admin.js

11 lines
334 B
JavaScript
Raw Normal View History

2021-01-21 21:06:52 +00:00
'use strict';
const eejs = require('../../eejs');
2021-01-21 21:06:52 +00:00
exports.expressCreateServer = (hookName, args, cb) => {
2020-11-23 13:24:19 -05:00
args.app.get('/admin', (req, res) => {
2021-01-21 21:06:52 +00:00
if ('/' !== req.path[req.path.length - 1]) return res.redirect('./admin/');
res.send(eejs.require('ep_etherpad-lite/templates/admin/index.html', {req}));
});
return cb();
2020-11-23 13:24:19 -05:00
};