Move voting to a new endpoint
/election/{id}/votes
This commit is contained in:
@ -18,7 +18,7 @@ func (app *application) routes() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.HandleFunc("POST /election", app.createElection)
|
||||
mux.HandleFunc("POST /votes", app.createVotes)
|
||||
mux.HandleFunc("POST /election/{id}/votes", app.createVotes)
|
||||
|
||||
standard := alice.New(app.recoverPanic, app.logRequest)
|
||||
return standard.Then(mux)
|
||||
|
Reference in New Issue
Block a user