const jwt = require("jsonwebtoken");
const config = require("config");
const { CompanyUsers } = require("../models/CompanyUsers");
const { Company } = require("../models/Company");

module.exports = async function (req, res, next) {
  console.log("REQUEST host: ", req.headers.host); //BaseURl
  try {
    // if (req.headers.host !== "localhost:8080") {
    //   if (req.headers.host !== "istarhearing.com") {
    //     console.log("No company found");
    //     return res.status(400).send("No company found.");
    //   }
    // }
    return next();
  } catch (err) {
    console.log("ERR: ", err);
    return res.status(400).send("Error in validating token");
  }
};
