const db = require("../db/db");

const getalldetails = () => {
  const sql = `SELECT COUNT(*) AS reqCount FROM users`;
  return new Promise((resolve, reject) => {
    db.query(sql, (err, results) => {
      if (err) {
        reject(err);
      } else {
        resolve(results);
      }
    });
  });
};

module.exports = {
  getalldetails,
};
