@ -66,7 +66,7 @@ module.exports.loginUser = (request, response) => {
// get current user details controller.
exports.getCurrentUserDetails = async (req, res) => {
try {
const user = await User.findById(req.user.id, 'email');
const user = await User.findById(req.user.id);
if (!user) {
return res.status(404).json({ message: 'User not found' });