Make isValid a method and add skeleton for createVote

This commit is contained in:
2025-01-02 17:49:23 +01:00
parent 1554743a95
commit f884e29ccd
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@ func (app *application) routes() http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("POST /election", app.createElection)
mux.HandleFunc("POST /vote", app.createVote)
standard := alice.New(app.recoverPanic, app.logRequest)
return standard.Then(mux)