Add POST /election
This commit is contained in:
12
cmd/web/helpers.go
Normal file
12
cmd/web/helpers.go
Normal file
@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func (app *application) serverError(w http.ResponseWriter, r *http.Request, err error) {
|
||||
var (
|
||||
method = r.Method
|
||||
uri = r.URL.RequestURI()
|
||||
)
|
||||
app.logger.Error(err.Error(), "method", method, "uri", uri)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
}
|
Reference in New Issue
Block a user