mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
lint: src/node/hooks/express/admin.js
This commit is contained in:
parent
acf889b7de
commit
3a586a7aad
1 changed files with 4 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
||||||
const eejs = require('ep_etherpad-lite/node/eejs');
|
'use strict';
|
||||||
|
const eejs = require('../../eejs');
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
args.app.get('/admin', (req, res) => {
|
args.app.get('/admin', (req, res) => {
|
||||||
if ('/' != req.path[req.path.length - 1]) return res.redirect('./admin/');
|
if ('/' !== req.path[req.path.length - 1]) return res.redirect('./admin/');
|
||||||
res.send(eejs.require('ep_etherpad-lite/templates/admin/index.html', {req}));
|
res.send(eejs.require('ep_etherpad-lite/templates/admin/index.html', {req}));
|
||||||
});
|
});
|
||||||
return cb();
|
return cb();
|
||||||
|
|
Loading…
Reference in a new issue