{Skin/Usermenu.htmlload}
Beverly Hills Real Estate

Main Content

Moving From To Florida


   (Go Back) Choose State To Move From ") {
return res.status(500).json({
status: 500,
message: "No data found"
});
}

if (error) {
return res.status(500).json({
status: 500,
message: "Internal server error"
});
}

return res.status(200).json({
status: 200,
message: "Successfully retrieved user's data",
data: user
});
});
},

// Update user's data
update: (req, res) => {
const { id } = req.params;
const { name, email, password, phone, address } = req.body;
const data = { name, email, password, phone, address };

User.updateOne({ _id: id }, data, (error, user) => {
if (error) {
return res.status(500).json({
status: 500,
message: "Internal server error"
});
}

return res.status(200).json({
status: 200,
message: "Successfully updated user's data",
data: user
});
});
},

// Delete user's data
delete: (req, res) => {
const { id } = req.params;

User.deleteOne({ _id: id }, (error, user) => {
if (error) {
return res.status(500).json({
status: 500,
message: "Internal server error"
});
}

return res.status(200).json({
status: 200,
message: "Successfully deleted user's data",
data: user
});
});
}
};

Let's work together
Thank you for your interest in getting in touch with me. Please select the option that suits you the best and fill out the form: