Skip to content

Commit

Permalink
Merge pull request #3660 from airqo-platform/hf-update-user
Browse files Browse the repository at this point in the history
just returned updated user details after updating user
  • Loading branch information
Baalmart authored Oct 15, 2024
2 parents 5ff53f7 + fde95e8 commit 839fc94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/auth-service/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,11 @@ UserSchema.statics = {
).select(fieldsString);

if (!isEmpty(updatedUser)) {
const { _id, ...userData } = updatedUser._doc;
return {
success: true,
message: "successfully modified the user",
data: updatedUser._doc,
data: userData,
status: httpStatus.OK,
};
} else if (isEmpty(updatedUser)) {
Expand Down

0 comments on commit 839fc94

Please sign in to comment.