Merge pull request #146 from ajayyy/testing

Don't send webhooks for duplicate votes
This commit is contained in:
Ajay Ramachandran 2020-09-16 09:32:09 -04:00 committed by GitHub
commit abc91cc7a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -355,17 +355,19 @@ async function voteOnSponsorTime(req, res) {
res.sendStatus(200);
sendWebhooks({
UUID,
nonAnonUserID,
voteTypeEnum,
isVIP,
isOwnSubmission,
row,
category,
incrementAmount,
oldIncrementAmount
});
if (incrementAmount - oldIncrementAmount !== 0) {
sendWebhooks({
UUID,
nonAnonUserID,
voteTypeEnum,
isVIP,
isOwnSubmission,
row,
category,
incrementAmount,
oldIncrementAmount
});
}
} catch (err) {
logger.error(err);