From 66265001b78fda98929ad62dff8b438874c1aa05 Mon Sep 17 00:00:00 2001 From: Balthazar Wilson <wilsonba@etu.utc.fr> Date: Thu, 19 Oct 2023 20:52:24 +0200 Subject: [PATCH] fix: removed print and modified the ballot appropriately --- agt/ballotagent/new_ballot.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/agt/ballotagent/new_ballot.go b/agt/ballotagent/new_ballot.go index c28f438..e0121b2 100644 --- a/agt/ballotagent/new_ballot.go +++ b/agt/ballotagent/new_ballot.go @@ -129,7 +129,6 @@ func (rsa *BallotServerAgent) handleBallot( isOpen: false, results: rad.ResultResponse{Winner: int(winner), Ranking: intRanking}, } - fmt.Println(targetBallot) } func (rsa *BallotServerAgent) handleBallotWithSingleOption( @@ -171,6 +170,13 @@ func (rsa *BallotServerAgent) handleBallotWithSingleOption( for _, alt := range ranking { 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}, + } } -- GitLab