const log = require("../utils/logs.utils");

module.exports = async function requireJson(req, res, next) {
  if (req.headers["content-type"] !== "application/json") {
    log.out("requireJson.middlewares: Bad Request: Not in JSON format");
    res.status(400).send({ status: 400, message: "Server requires JSON" });
  } else {
    next();
  }
};

// Possibly want to check the req type?
