This commit is contained in:
2023-10-18 15:31:10 -04:00
parent c77b1ee890
commit 8a0f27476c

View File

@@ -140,7 +140,7 @@ function PlurVote(ip,NewChoice)
NewChoice=CanId(NewChoice); NewChoice=CanId(NewChoice);
if (typeof(NewChoice)=='string') { Experiment.PlurResult.set(NewChoice,Experiment.PlurResult.get(NewChoice)+1); Experiment.PlurCount+=1; } if (typeof(NewChoice)=='string') { Experiment.PlurResult.set(NewChoice,Experiment.PlurResult.get(NewChoice)+1); Experiment.PlurCount+=1; }
Experiment.PlurVotes.set(ip,NewChoice); Experiment.PlurVotes.set(ip,NewChoice);
console.log(Experiment); console.log("Plurality vote from "+ip);
} }
@@ -177,6 +177,7 @@ function RangeVote(ip,entries)
if (OldVote) AddToRangeResult(OldVote,-1); if (OldVote) AddToRangeResult(OldVote,-1);
Experiment.RangeVotes.set(ip,NewVote); Experiment.RangeVotes.set(ip,NewVote);
AddToRangeResult(NewVote,1); AddToRangeResult(NewVote,1);
console.log("Range vote from "+ip);
} }
function SendResults(req,res) function SendResults(req,res)