{"size": 237, "ext": "js", "max_stars_repo_path": "src/models/health.js", "max_stars_repo_name": "interledger-deprecated/five-bells-ledger", "max_stars_repo_stars_event_min_datetime": "2016-10-18T12:26:49.000Z", "max_stars_repo_stars_event_max_datetime": "2018-08-10T15:14:17.000Z", "max_issues_repo_path": "src/models/health.js", "max_issues_repo_name": "cross-chain-deprecated/five-bells-ledger", "max_issues_repo_issues_event_min_datetime": "2016-10-18T16:41:32.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-06T12:47:51.000Z", "max_forks_repo_path": "src/models/health.js", "max_forks_repo_name": "cross-chain-deprecated/five-bells-ledger", "max_forks_repo_forks_event_min_datetime": "2016-10-21T09:08:13.000Z", "max_forks_repo_forks_event_max_datetime": "2018-03-30T17:54:32.000Z"}
{"max_stars_count": 20, "max_issues_count": 106, "max_forks_count": 10, "avg_line_length": 13.9411764706, "max_line_length": 44, "alphanum_fraction": 0.6160337553}
'use strict'

const db = require('../lib/db')

async function getDbHealth () {
  const isConnected = await db.isConnected()
  return isConnected ? {
    status: 'OK'
  } : {
    status: 'NOT OK'
  }
}

module.exports = {
  getDbHealth
}
