Put up some '/admin doesn't exist' notice.

This commit is contained in:
Marcel Klehr 2012-11-01 19:45:26 +01:00
parent 2311b0fbb4
commit 2d6e577683
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@
{ "name": "importexport", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/importexport:expressCreateServer" } },
{ "name": "errorhandling", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/errorhandling:expressCreateServer" } },
{ "name": "socketio", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/socketio:expressCreateServer" } },
{ "name": "admin", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/admin:expressCreateServer" } },
{ "name": "adminplugins", "hooks": {
"expressCreateServer": "ep_etherpad-lite/node/hooks/express/adminplugins:expressCreateServer",
"socketio": "ep_etherpad-lite/node/hooks/express/adminplugins:socketio" } }

View File

@ -0,0 +1,5 @@
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/admin', function(req, res) {
res.send( 501, 'Not Implemented, yet. Meanwhile go to <a href="/admin/plugins">/admin/plugins</a>' );
});
};