diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index 627277e..6ceb4bf 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -192,6 +192,7 @@ func (app *application) CreateVotes(w http.ResponseWriter, r *http.Request, id i _, err := app.votes.Insert(voterIdentity, election.ID, c.ChoiceText, c.Tokens) if err != nil { app.serverError(w, r, err) + return } }