Skip to content

Commit

Permalink
We do not need to call this as it is called anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 16, 2024
1 parent 0d1f334 commit 24e91d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions controllers/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ func (r *RegistrationRepo) AddVoter(c echo.Context) error {
return c.Redirect(http.StatusTemporaryRedirect, "/")
}

err = c.Request().ParseForm()
if err != nil {
return r.errorHandle(c, err)
}
email := c.Request().FormValue("email")
name := c.Request().FormValue("name")
email := c.FormValue("email")
name := c.FormValue("name")
if len(name) == 0 || len(email) == 0 {
return r.errorHandle(c, fmt.Errorf("name and email need to be filled"))
}
Expand Down

0 comments on commit 24e91d7

Please sign in to comment.