Skip to content

Commit

Permalink
improve update user service
Browse files Browse the repository at this point in the history
  • Loading branch information
itzgeebee committed Oct 13, 2022
1 parent ab25d5b commit 426ab4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/services/users/update-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ const constructQuery = (cols) => {
* @returns {Object} - updated user
*/
const updateUser = async (id,
requestBody
data
) => {

const query = constructQuery(requestBody)
const query = constructQuery(data)

const colValues = Object.keys(
requestBody
).map(key => requestBody[key])
const colValues = Object.values(
data
)

colValues.push(id)

Expand Down

0 comments on commit 426ab4d

Please sign in to comment.