Write test skeleton
This commit is contained in:
@ -14,7 +14,7 @@ type createElectionRequestWithValidator struct {
|
||||
|
||||
func (app *application) createElection(w http.ResponseWriter, r *http.Request) {
|
||||
var request createElectionRequestWithValidator
|
||||
err := app.decodePostForm(r, &request)
|
||||
err := app.unmarshalRequest(r, &request)
|
||||
if err != nil {
|
||||
app.clientError(w, http.StatusBadRequest, err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user