Merge branch 'bluewave-labs:master' into backend-completion

This commit is contained in:
Mohammad Khalilzadeh authored and GitHub committed 2024-07-04 11:18:30 +03:30
commit a2e378f1dd
13 files changed
+240 -53

No files matched your search

+8 -1
View File
@@ -88,9 +88,16 @@ const getUserByEmail = async (req, res) => {
const updateUser = async (req, res) => {
const candidateUserId = req.params.userId;
const candidateUser = req.body;
try {
const candidateUser = { ...req.body };
if (req.file) {
candidateUser.profileImage = {
data: req.file.buffer,
contentType: req.file.mimetype,
};
}
const updatedUser = await UserModel.findByIdAndUpdate(
candidateUserId,
candidateUser,