Skip to content

Commit

Permalink
Refactor getCurrentUser response format -
Browse files Browse the repository at this point in the history
By ridam singhal
  • Loading branch information
hiteshchoudhary committed Dec 19, 2023
1 parent 23b80aa commit 2c39bf6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ const changeCurrentPassword = asyncHandler(async(req, res) => {
const getCurrentUser = asyncHandler(async(req, res) => {
return res
.status(200)
.json(200, req.user, "current user fetched successfully")
.json(new ApiResponse(
200,
user,
"User fetched successfully"
))
})

const updateAccountDetails = asyncHandler(async(req, res) => {
Expand Down

0 comments on commit 2c39bf6

Please sign in to comment.