const Homewellnes = require("../models/homewellnes");




exports.homewellnesscreate = async function (req, res ,next) {
		  try {
			  
				let homewellnesssave = new Homewellnes(
        {
            category: req.body.category,
            servicemode: req.body.servicemode,
			clientname: req.body.clientname,
			mobilenumber: req.body.mobilenumber,
			doctorid: req.body.doctorid,
        }
    );
	homewellnesssave.save(function (err) {
        if (err) {
            return next(err);
        }
		res.status(200).json({
              message:
                "Home Wellness Created successfully" ,
            });
      
    })
			
}
		  catch (err) {
			console.log(err)
		}
		  
		  
      
};	



exports.homewellnesslist = (req, res, next) => {
	Homewellnes.find({doctorid: req.body.doctorid,})
    .then((homewellness) => {
      res.status(200).json({homewellnesslist:homewellness});
    })
    .catch((err) => {
      console.log(err);
    });

};