const { pool } = require('../database')

/**
 * function to return all status
 * @returns promise
 */
async function getStatus() {
  const sql = 'SELECT * FROM status'

  try {
    let [rows] = await pool.query(sql)

    return rows
  } catch (error) {
    return error
  }
}

module.exports = {
  getStatus
}
