Files
qv/cmd/web/routes.go
2024-12-27 18:03:46 +01:00

16 lines
284 B
Go

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)
}