Skip to main content

Documentation Index

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

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

Call this endpoint to read the active election configuration stored in the database. The response contains the total voter count, the ballot question (vote theme), and the list of candidate or option names that will appear on each ballot. Use this data in your frontend to display the ballot to voters before they cast a vote. If no configuration row exists yet, the system automatically creates one with default values.

Request

GET /config/voting-system-config This endpoint requires no request body and accepts no query parameters.

Response

num_voters
integer
required
The configured total number of voters allowed in this election.
vote_theme
string
The ballot question or election topic shown to voters. May be null if not yet set.
choices
string[]
The ordered list of candidate or option names. Up to 4 entries. May be null or an empty array if not yet configured.

HTTP status codes

CodeMeaning
200Configuration returned successfully.

Example

Retrieve this config to display the ballot options to voters in the frontend before the voting phase begins.
curl -X GET https://your-api/config/voting-system-config
{
  "num_voters": 100,
  "vote_theme": "2024 Board Election",
  "choices": ["Alice Johnson", "Bob Smith", "Carol White", "Dave Brown"]
}

Build docs developers (and LLMs) love