Skip to content

Commit

Permalink
Merge pull request #139 from SquareTable/138-tempvoteonpoll-fails-whe…
Browse files Browse the repository at this point in the history
…n-you-dont-have-a-vote-on-a-poll

Fixed temp/voteonpoll failing
  • Loading branch information
Sebastian-Webster authored Sep 15, 2023
2 parents a3fb3a9 + 99a1ebb commit c764b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/Temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ class TempController {
return resolve(HTTPWTHandler.serverError('An error occurred while removing existing vote. Please try again.'))
})
} else {
Poll.findOneAndUpdate({_id: {$eq: {$eq: pollId}}}, { $push: { [optionSelected] : userId }}).then(function(){
Poll.findOneAndUpdate({_id: {$eq: pollId}}, { $push: { [optionSelected] : userId }}).then(function(){
return resolve(HTTPWTHandler.OK('Vote successful', {lastVote: "None"}))
})
.catch(err => {
Expand Down

0 comments on commit c764b9a

Please sign in to comment.