Add POST /election
This commit is contained in:
15
cmd/web/routes.go
Normal file
15
cmd/web/routes.go
Normal file
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/justinas/alice"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (app *application) routes() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.HandleFunc("POST /election", app.createElection)
|
||||
|
||||
standard := alice.New(app.recoverPanic, app.logRequest)
|
||||
return standard.Then(mux)
|
||||
}
|
Reference in New Issue
Block a user