diff --git a/common/js/index-buttons.js b/common/js/index-buttons.js index 69aa89d1..1963dd5a 100644 --- a/common/js/index-buttons.js +++ b/common/js/index-buttons.js @@ -8,14 +8,14 @@ document.addEventListener('DOMContentLoaded', async function () { const authSession = UI.authn.authSession if (!authn.currentUser()) await authn.checkUser() - const user = authn.currentUser() + let user = authn.currentUser() // IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT if (user) { window.localStorage.setItem(keyname, user.uri) await authSession.logout() } else { - const webId = window.localStorage.getItem(keyname) + let webId = window.localStorage.getItem(keyname) // IF NOT LOGGED IN AND COOKIE EXISTS: REMOVE COOKIE, HIDE WELCOME, SHOW LINK TO PROFILE if (webId) { @@ -28,9 +28,9 @@ document.addEventListener('DOMContentLoaded', async function () { // SHOW WELCOME, SHOW LOGIN BUTTON // HIDE LOGIN BUTTON, ADD REGISTER BUTTON else { - const loginArea = document.getElementById('loginStatusArea') - const html = '' - const span = document.createElement('span') + let loginArea = document.getElementById('loginStatusArea') + let html = '' + let span = document.createElement('span') span.innerHTML = html loginArea.appendChild(span) loginArea.appendChild(UI.login.loginStatusBox(document, null, {})) diff --git a/lib/create-server.js b/lib/create-server.js index 1b8760ef..23fe4048 100644 --- a/lib/create-server.js +++ b/lib/create-server.js @@ -68,8 +68,8 @@ function createServer (argv, app) { } const credentials = Object.assign({ - key, - cert + key: key, + key: cert }, argv) if (ldp.webid && ldp.auth === 'tls') { diff --git a/lib/handlers/get.js b/lib/handlers/get.js index d7c34896..b73146ce 100644 --- a/lib/handlers/get.js +++ b/lib/handlers/get.js @@ -43,9 +43,9 @@ async function handler (req, res, next) { const options = { hostname: req.hostname, - path, - includeBody, - possibleRDFType, + path: path, + includeBody: includeBody, + possibleRDFType: possibleRDFType, range: req.headers.range, contentType: req.headers.accept } diff --git a/lib/models/account-manager.js b/lib/models/account-manager.js index 0aada4d7..c41cb1ad 100644 --- a/lib/models/account-manager.js +++ b/lib/models/account-manager.js @@ -552,7 +552,7 @@ class AccountManager { const emailData = { to: userAccount.email, webId: userAccount.webId, - deleteUrl + deleteUrl: deleteUrl } return this.emailService.sendWithTemplate('delete-account', emailData) diff --git a/test/integration/http-copy-test.js b/test/integration/http-copy-test.js index 9a31be74..f592b13d 100644 --- a/test/integration/http-copy-test.js +++ b/test/integration/http-copy-test.js @@ -43,8 +43,8 @@ describe('HTTP COPY API', function () { function createOptions (method, url, user) { const options = { - method, - url, + method: method, + url: url, headers: {} } if (user) { diff --git a/test/unit/create-account-request-test.js b/test/unit/create-account-request-test.js index 20958860..656f4c68 100644 --- a/test/unit/create-account-request-test.js +++ b/test/unit/create-account-request-test.js @@ -107,7 +107,7 @@ describe('CreateAccountRequest', () => { const requests = invalidUsernames.map((username) => { const aliceData = { - username, password: '1234' + username: username, password: '1234' } const req = HttpMocks.createRequest({ app: { locals }, body: aliceData })