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:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user