Add page to create an election

This commit is contained in:
2025-01-13 19:58:42 +01:00
parent c7cccf2ec1
commit ee847020f7
7 changed files with 239 additions and 125 deletions

View File

@ -87,7 +87,7 @@ func (app *application) CreateElection(w http.ResponseWriter, r *http.Request) {
var res []byte
if request.AreVotersKnown {
voterIdentities := make([]string, 0, request.MaxVoters)
voterIdentities := make([]string, 0, request.MaxVoters) // TODO: this is way too slow
for i := 0; i < request.MaxVoters; i++ {
randomIdentity := randomVoterIdentity()
_, err := app.voters.Insert(randomIdentity, electionId)