exports.getById = async (req, res) => {
let reqParams = req.params.id || "5dd44db9c6f4762b80b8e600"
const user = User.find({ _id: reqParams }).select("name").exec((err, result) => {
if (err || !result) {
console.log(err)
return res.status(400).json({
error: err
})
}
res.status(200).json({result})
})
}