From 05c8739b0a17867882a6125fb49501b8a2933855 Mon Sep 17 00:00:00 2001 From: Marti Martz Date: Tue, 12 Jun 2018 03:28:30 -0600 Subject: [PATCH] EOL Admin+ Session Length route and code (#1418) * The basics of this should be covered by session active data route now. A view will be worked on to integrate it over time when available. Post #1203 ... related to #604 Auto-merge --- controllers/admin.js | 30 ------------------------------ routes.js | 1 - views/pages/adminPage.html | 3 --- 3 files changed, 34 deletions(-) diff --git a/controllers/admin.js b/controllers/admin.js index 68fab38e5..f7232efb3 100644 --- a/controllers/admin.js +++ b/controllers/admin.js @@ -428,36 +428,6 @@ exports.adminSessionActiveView = function (aReq, aRes, aNext) { }); }; -exports.adminSessionLengthView = function (aReq, aRes, aNext) { - if (!userIsAdmin(aReq)) { - statusCodePage(aReq, aRes, aNext, { - statusCode: 403, - statusMessage: 'This page is only accessible by admins.' - }); - return; - } - - aReq.sessionStore.length(function (aErr, aLength) { - if (aErr) { - statusCodePage(aReq, aRes, aNext, { - statusCode: 520, - statusMessage: 'Unknown error.' - }); - return; - } - - statusCodePage(aReq, aRes, aNext, { - statusCode: 200, - statusMessage: 'session length: ' + aLength, - isCustomView: true, - statusData: { - isAdminSessionLengthView: true, - length: aLength - } - }); - }); -}; - // View everything about current deployed `./package.json` exports.adminNpmPackageView = function (aReq, aRes, aNext) { // diff --git a/routes.js b/routes.js index 8965d7c2b..b29d357a8 100644 --- a/routes.js +++ b/routes.js @@ -101,7 +101,6 @@ module.exports = function (aApp) { aApp.route('/admin/git/short').get(admin.adminGitShortView); aApp.route('/admin/git/branch').get(admin.adminGitBranchView); aApp.route('/admin/process/clone').get(admin.adminProcessCloneView); - aApp.route('/admin/session/length').get(admin.adminSessionLengthView); aApp.route('/admin/session/active').get(admin.adminSessionActiveView); aApp.route('/admin/npm/package').get(admin.adminNpmPackageView); aApp.route('/admin/npm/list').get(admin.adminNpmListView); diff --git a/views/pages/adminPage.html b/views/pages/adminPage.html index 0277608e6..a0ab844ab 100644 --- a/views/pages/adminPage.html +++ b/views/pages/adminPage.html @@ -22,9 +22,6 @@ Show clone - - Show session length - Show session active data