This repository has been archived on 2019-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
scoreboard/features/index/handler.go

18 lines
438 B
Go
Raw Permalink Normal View History

2019-05-27 21:46:09 +00:00
package index
import (
"html/template"
"net/http"
"git.cliffbreak.de/haveachin/scoreboard/features"
"git.cliffbreak.de/haveachin/scoreboard/response"
)
func queryHandler(s features.Service, t *template.Template) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
response.WebHandler(w, response.WebHandlerFunc(func() (response.Page, int) {
return newPage(*t), http.StatusOK
}))
})
}