Closed vteague closed 3 months ago
Note this will need to deal with error responses from raire-service, e.g. TIED_WINNERS. These are returned in the http header and (in most cases) should be reported to the user.
Also note this will have to update the winner field in the data structure subsequently used to generate reports. This was not done in the prototype. I think this is ContestResult, but need to check.
We debated whether it's appropriate to have an IRVContestResult for just this reason.
Use ContestResult::setWinners and ContestResult::setLosers. IRV has only one winner, so every candidate who is not the winner is a loser. Explicitly set both to blank if an error is returned (because otherwise corla will fill them with plurality winners based on preference-mentions, which is meaningless).
The persistence and proper reporting of winners are now in new cards: #136, #137
Implement the Generate Assertions endpoint, calling the /generate-assertions endpoint in raire-service.