Skip to content

Commit

Permalink
Fix new lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis authored Mar 25, 2024
1 parent 1589605 commit eb539f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions bin/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,16 @@ module.exports = {
batchMax: parseInt(config.get('BATCH_RATE_LIMIT_MAX')) || 0
},
webhook: {
githubSecret: config.get('WEBHOOK_GITHUB_SECRET') || (() => { throw new Error('WEBHOOK_GITHUB_SECRET is required'); })(),
crawlerSecret: config.get('WEBHOOK_CRAWLER_SECRET') || (() => { throw new Error('WEBHOOK_CRAWLER_SECRET is required'); })()
githubSecret:
config.get('WEBHOOK_GITHUB_SECRET') ||
(() => {
throw new Error('WEBHOOK_GITHUB_SECRET is required')
})(),
crawlerSecret:
config.get('WEBHOOK_CRAWLER_SECRET') ||
(() => {
throw new Error('WEBHOOK_CRAWLER_SECRET is required')
})()
},
search: {
service: loadFactory(config.get('SEARCH_PROVIDER') || 'memory', 'search')
Expand Down
2 changes: 1 addition & 1 deletion lib/entityCoordinates.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EntityCoordinates {

static fromString(path) {
if (!path || typeof path !== 'string') return null

path = path.startsWith('/') ? path.slice(1) : path
const [type, provider, namespace, name, revision] = path.split('/')
return new EntityCoordinates(type, provider, namespace, name, revision)
Expand Down
2 changes: 1 addition & 1 deletion routes/definitions-1.0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function getDefinition(req, resp) {
try {
coordinatesEntity = await utils.toNormalizedEntityCoordinates(coordinatesEntity)
} catch (err) {
return resp.status(404).send(`The ${(encodeURIComponent(coordinates))} is not public.`)
return resp.status(404).send(`The ${encodeURIComponent(coordinates)} is not public.`)
}
const result = await definitionService.get(coordinatesEntity, pr, force, expand)

Expand Down

0 comments on commit eb539f0

Please sign in to comment.