Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Elections returned from the /elections/ API should have a "hasResults" attribute.  #271

@carlschroedl

Description

@carlschroedl

Is your feature request related to a problem? Please describe.
The elections returned from the /elections/ API lack information on whether a result snapshot has been calculated for that election. The front end compensated by issuing one API /elections/###/resultsSnapshot call for each election. For users with many elections, this can produce a lot of extra web service calls and cause Cloudflare to mistake the user as a DoS attacker and block subsequent requests to the server.

Describe the solution you'd like
Include a boolean "hasResults" attribute in each election returned from the /elections/ API . Once this is present, the UI could be simplified to condition the display of the results link on the new boolean attribute and eliminate the follow-on /resultsSnapshot web service calls.

Describe alternatives you've considered

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThis is a good issue for new contributors to tackle.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions