Add voterIdentities to copy again and fix issue if there was no body in the response (in the case of unknown voters election)

This commit is contained in:
2025-01-14 20:07:02 +01:00
parent f784eb474f
commit 70a0cd7d3b
2 changed files with 51 additions and 0 deletions

View File

@ -104,6 +104,7 @@ func (app *application) CreateElection(w http.ResponseWriter, r *http.Request) {
app.serverError(w, r, err)
return
}
w.Header().Set("Content-Type", "application/json")
}
w.Header().Set("Location", fmt.Sprintf("/election/%v", electionId))
@ -290,6 +291,7 @@ func (app *application) GetElectionResults(w http.ResponseWriter, r *http.Reques
return
}
w.Header().Set("Content-Type", "application/json")
w.Write(response)
}