Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed May 9, 2024
1 parent 0e5a44d commit 58fab59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions healthcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ axios
process.exit(1)
})

async function notify(message) {
async function notify (message) {
console.log(message)
if (shouldSendEmail) await sendMail(message)
if (shouldPostToWebHook) await postToWebHook(message)
}

async function postToWebHook(text) {
async function postToWebHook (text) {
await axios
.post(process.env.HEALTH_CHECK_WEB_HOOK, { text })
.catch((error) => {
console.error(error)
})
}

async function sendMail(message) {
async function sendMail (message) {
const messageParams = {
from: process.env.HEALTH_CHECK_EMAIL_FROM,
to: process.env.HEALTH_CHECK_EMAIL_RECIPIENT,
Expand Down
3 changes: 1 addition & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export async function build (opts = {}) {
`${req.protocol}://${req.headers.host}/instance/${defaultTenantName}/credentials/issue`,
getUnsignedVC()
)
if (!data.proof)
throw new SigningException(503, 'issuer-coordinator healthz failed')
if (!data.proof) { throw new IssuingException(503, 'issuer-coordinator healthz failed') }
} catch (e) {
console.log(`exception in healthz: ${JSON.stringify(e)}`)
return res.status(503).json({
Expand Down

0 comments on commit 58fab59

Please sign in to comment.