Skip to content

Commit 2a7e6a5

Browse files
committed
Fixed a scoreboard caller issue
1 parent 2d0347b commit 2a7e6a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

router/otherCaller/scoreBoard.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,14 @@ export default async function scoreBoard(req: Request<any>, res: Response<any>)
6262
const caller = await Caller.findOne({
6363
phone: phone,
6464
pinCode: { $eq: req.body.pinCode },
65-
area: { $eq: req.body.area },
66-
campaigns: { $eq: req.body.campaignId }
65+
$or: [
66+
{
67+
campaigns: req.body.campaignId
68+
},
69+
{
70+
area: { $eq: req.body.area }
71+
}
72+
]
6773
});
6874
if (!caller) {
6975
res.status(404).send({ message: 'Caller not found', OK: false });

0 commit comments

Comments
 (0)