Skip to content

Commit

Permalink
EOL Admin+ Session Length route and code (#1418)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Martii committed Jun 12, 2018
1 parent e744a6b commit 05c8739
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
30 changes: 0 additions & 30 deletions controllers/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
//
Expand Down
1 change: 0 additions & 1 deletion routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions views/pages/adminPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
<a href="/admin/process/clone" class="list-group-item">
<i class="fa fa-fw fa-database"></i> Show clone
</a>
<a href="/admin/session/length" class="list-group-item">
<i class="fa fa-fw fa-database"></i> Show session length
</a>
<a href="/admin/session/active" class="list-group-item">
<i class="fa fa-fw fa-database"></i> Show session active data
</a>
Expand Down

0 comments on commit 05c8739

Please sign in to comment.