Skip to content

Commit eeb6b50

Browse files
committed
EOL Admin+ Session Length route and code
* 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 OpenUserJS#1203 ... related to OpenUserJS#604
1 parent e744a6b commit eeb6b50

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

controllers/admin.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -428,36 +428,6 @@ exports.adminSessionActiveView = function (aReq, aRes, aNext) {
428428
});
429429
};
430430

431-
exports.adminSessionLengthView = function (aReq, aRes, aNext) {
432-
if (!userIsAdmin(aReq)) {
433-
statusCodePage(aReq, aRes, aNext, {
434-
statusCode: 403,
435-
statusMessage: 'This page is only accessible by admins.'
436-
});
437-
return;
438-
}
439-
440-
aReq.sessionStore.length(function (aErr, aLength) {
441-
if (aErr) {
442-
statusCodePage(aReq, aRes, aNext, {
443-
statusCode: 520,
444-
statusMessage: 'Unknown error.'
445-
});
446-
return;
447-
}
448-
449-
statusCodePage(aReq, aRes, aNext, {
450-
statusCode: 200,
451-
statusMessage: 'session length: ' + aLength,
452-
isCustomView: true,
453-
statusData: {
454-
isAdminSessionLengthView: true,
455-
length: aLength
456-
}
457-
});
458-
});
459-
};
460-
461431
// View everything about current deployed `./package.json`
462432
exports.adminNpmPackageView = function (aReq, aRes, aNext) {
463433
//

routes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ module.exports = function (aApp) {
101101
aApp.route('/admin/git/short').get(admin.adminGitShortView);
102102
aApp.route('/admin/git/branch').get(admin.adminGitBranchView);
103103
aApp.route('/admin/process/clone').get(admin.adminProcessCloneView);
104-
aApp.route('/admin/session/length').get(admin.adminSessionLengthView);
105104
aApp.route('/admin/session/active').get(admin.adminSessionActiveView);
106105
aApp.route('/admin/npm/package').get(admin.adminNpmPackageView);
107106
aApp.route('/admin/npm/list').get(admin.adminNpmListView);

views/pages/adminPage.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
<a href="/admin/process/clone" class="list-group-item">
2323
<i class="fa fa-fw fa-database"></i> Show clone
2424
</a>
25-
<a href="/admin/session/length" class="list-group-item">
26-
<i class="fa fa-fw fa-database"></i> Show session length
27-
</a>
2825
<a href="/admin/session/active" class="list-group-item">
2926
<i class="fa fa-fw fa-database"></i> Show session active data
3027
</a>

0 commit comments

Comments
 (0)