Update GPS.Request.js
This commit is contained in:
@@ -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}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user