Skip to content

Commit

Permalink
undid some default linter properties -> enabled standards
Browse files Browse the repository at this point in the history
  • Loading branch information
zg009 committed Mar 15, 2024
1 parent 133b28e commit b55a037
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions common/js/index-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 = '<input type="button" onclick="window.location.href=\'/register\'" value="Register to get a Pod" class="register-button">'
const span = document.createElement('span')
let loginArea = document.getElementById('loginStatusArea')
let html = '<input type="button" onclick="window.location.href=\'/register\'" value="Register to get a Pod" class="register-button">'
let span = document.createElement('span')
span.innerHTML = html
loginArea.appendChild(span)
loginArea.appendChild(UI.login.loginStatusBox(document, null, {}))
Expand Down
4 changes: 2 additions & 2 deletions lib/create-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
6 changes: 3 additions & 3 deletions lib/handlers/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion lib/models/account-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ class AccountManager {
const emailData = {
to: userAccount.email,
webId: userAccount.webId,
deleteUrl
deleteUrl: deleteUrl
}

return this.emailService.sendWithTemplate('delete-account', emailData)
Expand Down
4 changes: 2 additions & 2 deletions test/integration/http-copy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/create-account-request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit b55a037

Please sign in to comment.