Skip to content

Commit

Permalink
fix get gain (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
waelhanfi04 authored Jan 12, 2024
2 parents 30f4e0a + a02c04c commit 6a01544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/external.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ module.exports.externalAnswer = async (req, res) => {
var link = await CampaignLink.findOne({
id_prom: req.body.idProm,
}).lean()

const externalWallet = await UserExternalWallet.findOne({
walletId: link.id_wallet,
})
Expand Down Expand Up @@ -1191,7 +1191,7 @@ module.exports.externalAnswer = async (req, res) => {
stats = await answerOne(
link.typeSN + '',
link.idPost + '',
link.typeSN === '5' || link.typeSN === '1' ? link.idUser+ '' : externalWallet.UserId+ '',
link.typeSN === 5 || link.typeSN === 1 ? link.idUser+ '' : externalWallet.UserId+ '',
link.typeURL,
linkedinData,
tiktokProfile,
Expand Down Expand Up @@ -1275,7 +1275,7 @@ module.exports.externalAnswer = async (req, res) => {
views: stats?.views,
})
}


return responseHandler.makeResponseData(res, 200, 'success',copyStats)
} catch (err) {
Expand Down

0 comments on commit 6a01544

Please sign in to comment.