Update GPS.Request.js

This commit is contained in:
Mr Swift
2024-08-05 17:08:01 +03:30
parent e3e60558e6
commit b500b8db84
+2
View File
@@ -66,6 +66,7 @@ module.exports.changeStatus = [
status:1 status:1
}, },
{ new: true }) { new: true })
const userPreData = await User.findById(data.userId)
const userData = await User.findByIdAndUpdate( const userData = await User.findByIdAndUpdate(
data.userId, data.userId,
{ {
@@ -73,6 +74,7 @@ module.exports.changeStatus = [
shopNumber: data.shopNumber, shopNumber: data.shopNumber,
shopAddress: data.shopAddress, shopAddress: data.shopAddress,
birthDate: data.birthDate, birthDate: data.birthDate,
walletBalance:userPreData?.walletBalance | 0
}, },
{ new: true} { new: true}
) )