mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 21:34:24 +00:00
various small changes + almost complete ticket gen
This commit is contained in:
@@ -14,6 +14,7 @@ const twoFA = new auth();
|
||||
const path = require( 'path' );
|
||||
|
||||
let responseObjects = {};
|
||||
let authOk = {};
|
||||
|
||||
module.exports = ( app, settings ) => {
|
||||
/*
|
||||
@@ -85,6 +86,14 @@ module.exports = ( app, settings ) => {
|
||||
responseObjects[ request.session.token ] = response;
|
||||
} );
|
||||
|
||||
app.get( '/admin/2fa/ping', ( request, response ) => {
|
||||
if ( authOk[ request.session.token ] === 'ok' ) {
|
||||
response.send( { 'status': 'ok' } );
|
||||
} else {
|
||||
response.send( '' );
|
||||
}
|
||||
} );
|
||||
|
||||
app.get( '/test/login', ( request, response ) => {
|
||||
request.session.loggedInAdmin = true;
|
||||
response.send( 'Logged in' );
|
||||
|
||||
Reference in New Issue
Block a user