Skip to content
Snippets Groups Projects
Commit 66265001 authored by Balthazar Wilson's avatar Balthazar Wilson
Browse files

fix: removed print and modified the ballot appropriately

parent d14dbf22
Branches baltha_server
No related tags found
1 merge request!7Partie serveur
...@@ -129,7 +129,6 @@ func (rsa *BallotServerAgent) handleBallot( ...@@ -129,7 +129,6 @@ func (rsa *BallotServerAgent) handleBallot(
isOpen: false, isOpen: false,
results: rad.ResultResponse{Winner: int(winner), Ranking: intRanking}, results: rad.ResultResponse{Winner: int(winner), Ranking: intRanking},
} }
fmt.Println(targetBallot)
} }
func (rsa *BallotServerAgent) handleBallotWithSingleOption( func (rsa *BallotServerAgent) handleBallotWithSingleOption(
...@@ -171,6 +170,13 @@ func (rsa *BallotServerAgent) handleBallotWithSingleOption( ...@@ -171,6 +170,13 @@ func (rsa *BallotServerAgent) handleBallotWithSingleOption(
for _, alt := range ranking { for _, alt := range ranking {
intRanking = append(intRanking, int(alt)) intRanking = append(intRanking, int(alt))
} }
targetBallot.results = rad.ResultResponse{Winner: int(winner), Ranking: intRanking}
fmt.Println(targetBallot) rsa.ballots[ballot] = BallotInfo{
profile: profile,
options: targetBallot.options,
votersId: targetBallot.votersId,
nbAlts: targetBallot.nbAlts,
isOpen: false,
results: rad.ResultResponse{Winner: int(winner), Ranking: intRanking},
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment