From 2d6e5776834ad1848f76dfbe272af2e5661281d4 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 1 Nov 2012 19:45:26 +0100 Subject: [PATCH] Put up some '/admin doesn't exist' notice. --- src/ep.json | 1 + src/node/hooks/express/admin.js | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 src/node/hooks/express/admin.js diff --git a/src/ep.json b/src/ep.json index ce6d3a00f..f5a653f60 100644 --- a/src/ep.json +++ b/src/ep.json @@ -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" } } diff --git a/src/node/hooks/express/admin.js b/src/node/hooks/express/admin.js new file mode 100644 index 000000000..83bada227 --- /dev/null +++ b/src/node/hooks/express/admin.js @@ -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 /admin/plugins' ); + }); +}; \ No newline at end of file