mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
feat: apply eslint fixes
This commit is contained in:
parent
fc50fd56a9
commit
60cb02f9dd
5 changed files with 13 additions and 7 deletions
|
@ -65,7 +65,7 @@ const doVerification = async (profile) => {
|
|||
const claim = user.claims[iClaim]
|
||||
|
||||
promises.push(
|
||||
new Promise((resolve, reject) => {
|
||||
new Promise((resolve) => {
|
||||
(async () => {
|
||||
await claim.verify(verificationOptions)
|
||||
results.push([iUser, iClaim, claim])
|
||||
|
|
10
src/index.js
10
src/index.js
|
@ -49,13 +49,19 @@ let gitBranch = process.env.CI_COMMIT_BRANCH ?? process.env.COMMIT_BRANCH
|
|||
if (!gitBranch) {
|
||||
try {
|
||||
gitBranch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim()
|
||||
} catch (_) {}
|
||||
} catch (_err) {
|
||||
logger.debug('Could not get git branch',
|
||||
{ component: 'http_server', action: 'init' })
|
||||
}
|
||||
}
|
||||
let gitHash = process.env.CI_COMMIT_SHA ?? process.env.COMMIT_SHA
|
||||
if (!gitHash) {
|
||||
try {
|
||||
gitHash = execSync('git rev-parse HEAD').toString().trim()
|
||||
} catch (_) {}
|
||||
} catch (_err) {
|
||||
logger.debug('Could not get git hash',
|
||||
{ component: 'http_server', action: 'init' })
|
||||
}
|
||||
}
|
||||
|
||||
const app = express()
|
||||
|
|
|
@ -32,7 +32,7 @@ import * as httpContext from 'express-http-context2'
|
|||
import * as dotenv from 'dotenv'
|
||||
dotenv.config()
|
||||
|
||||
const anonymize = format((info, opts) => {
|
||||
const anonymize = format((info) => {
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
info.profile_id = undefined
|
||||
info.keyserver_domain = undefined
|
||||
|
@ -44,7 +44,7 @@ const anonymize = format((info, opts) => {
|
|||
return info
|
||||
})
|
||||
|
||||
const addRequestData = format((info, opts) => {
|
||||
const addRequestData = format((info) => {
|
||||
if (httpContext.get('requestId')) info.request_id = httpContext.get('requestId')
|
||||
if (httpContext.get('requestPath')) info.request_path = httpContext.get('requestPath')
|
||||
if (httpContext.get('requestIp')) info.request_ip = httpContext.get('requestIp')
|
||||
|
|
|
@ -256,7 +256,7 @@ const fetchKeybase = (username, fingerprint) => {
|
|||
profile = await doipjs.openpgp.fetchKeybase(username, fingerprint)
|
||||
fetchURL = `https://keybase.io/${username}/pgp_keys.asc?fingerprint=${fingerprint}`
|
||||
} catch (error) {
|
||||
return reject(new Error('No public keys could be fetched from Keybase'))
|
||||
return reject(new Error(`No public keys could be fetched from Keybase (${error})`))
|
||||
}
|
||||
|
||||
if (!profile) {
|
||||
|
|
|
@ -43,7 +43,7 @@ export function generatePageTitle (type, data) {
|
|||
case 'profile':
|
||||
try {
|
||||
return `${data.personas[data.primaryPersonaIndex].name} - Keyoxide`
|
||||
} catch (error) {
|
||||
} catch (_err) {
|
||||
return 'Profile - Keyoxide'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue