updateeeeeeeeeee
This commit is contained in:
@@ -136,7 +136,7 @@ module.exports.updateInstalled = [
|
||||
if (!installedDevice) {
|
||||
throw res.status(404).json({ msg: 'این ایدی وجود ندارد' })
|
||||
} else {
|
||||
const user = await User.findById(installedDevice.userId).select('walletBalance score')
|
||||
const user = await User.findById(installedDevice.userId).select('walletBalance score totalScore')
|
||||
const device = await Device.findById(installedDevice.deviceId)
|
||||
switch (req.params.type) {
|
||||
case 'accept': {
|
||||
@@ -146,6 +146,7 @@ module.exports.updateInstalled = [
|
||||
|
||||
user.walletBalance += device.profit
|
||||
// user.dollarBalance += device.dollarProfit
|
||||
user.totalScore += device.score
|
||||
user.score += device.score
|
||||
|
||||
await Score.create({
|
||||
|
||||
Reference in New Issue
Block a user