Fix lint errors.

Thanks to xet7 !

Related #2019
This commit is contained in:
Lauri Ojansivu 2019-03-08 19:00:56 +02:00
parent da267e1488
commit 08db39d76a

View file

@ -102,18 +102,13 @@ Template.defaultLayout.events({
async function authentication(event, instance) { async function authentication(event, instance) {
// If header login id is set, use it for login // If header login id is set, use it for login.
if (process.env.HEADER_LOGIN_ID) { // Header username = Email address
// Header username = Email address // Header password = Login ID
const match = req.headers[process.env.HEADER_LOGIN_EMAIL]; // Not user currently: req.headers[process.env.HEADER_LOGIN_FIRSTNAME]
// Header password = Login ID // and req.headers[process.env.HEADER_LOGIN_LASTNAME]
const password = req.headers[process.env.HEADER_LOGIN_ID]; const match = req.headers[process.env.HEADER_LOGIN_EMAIL] || $('#at-field-username_and_email').val();
//const headerLoginFirstname = req.headers[process.env.HEADER_LOGIN_FIRSTNAME]; const password = req.headers[process.env.HEADER_LOGIN_ID] || $('#at-field-password').val();
//const headerLoginLastname = req.headers[process.env.HEADER_LOGIN_LASTNAME];
} else {
const match = $('#at-field-username_and_email').val();
const password = $('#at-field-password').val();
}
if (!match || !password) return; if (!match || !password) return;