const { success } = require("../../handlers");
const { Enquiry } = require("../../models");

const saveEnquiry = async (req, res) => {
  try {
    let payload = req.body;
    console.log(payload);
    await Enquiry.create(payload);
    return success(res, {
      msg: "Enquiry created successfully!!",
    });
  } catch (err) {
    console.log(err);
    return success(res, {
      status: false,
      msg: "Something went wrong!!",
    });
  }
};

module.exports = {
  saveEnquiry,
};
