Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/front-end/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint returns the complete election tally once voting has closed and all ballots have been decrypted and validated. The response includes the total number of valid ballots alongside a per-candidate breakdown of vote counts and percentages. It is consumed by the results page to display the final standings.
GET /results/tally
No request body is required.

Response fields

total_votes
number
The total number of valid ballots counted in this election.
tally
TallyEntry[]
An array of per-candidate result objects, one entry per candidate.

Example request

curl "$API_URL/results/tally"

Example response

{
  "total_votes": 150,
  "tally": [
    { "candidate": "Alice", "count": 85, "percentage": 56.7 },
    { "candidate": "Bob", "count": 65, "percentage": 43.3 }
  ]
}
This endpoint is only available when voting_status === "vote_ended". Requests made while voting is still open or during registration will return an error or empty data.

Build docs developers (and LLMs) love