diff --git a/server/controllers/GPS.Request.js b/server/controllers/GPS.Request.js index b8893bf..4c742b2 100644 --- a/server/controllers/GPS.Request.js +++ b/server/controllers/GPS.Request.js @@ -66,6 +66,7 @@ module.exports.changeStatus = [ status:1 }, { new: true }) + const userPreData = await User.findById(data.userId) const userData = await User.findByIdAndUpdate( data.userId, { @@ -73,6 +74,7 @@ module.exports.changeStatus = [ shopNumber: data.shopNumber, shopAddress: data.shopAddress, birthDate: data.birthDate, + walletBalance:userPreData?.walletBalance | 0 }, { new: true} )