Merge pull request #1114 from marcelklehr/fix/admin-unimplemented-notice

Put up some '/admin doesn't exist' notice.
pull/1118/head
John McLear 2012-11-01 11:46:47 -07:00
commit b9f4e8450c
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>' );
});
};