Fix handlers
This commit is contained in:
@@ -92,7 +92,7 @@ func (s *Server) PageHandler(name string) httprouter.Handle {
|
||||
}
|
||||
|
||||
// IndexHandler ...
|
||||
func (s *Server) IndexHandler(name string) httprouter.Handle {
|
||||
func (s *Server) IndexHandler() httprouter.Handle {
|
||||
return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||
ctx := NewContext(s.config, s.db, r)
|
||||
s.render("index", w, ctx)
|
||||
@@ -100,7 +100,7 @@ func (s *Server) IndexHandler(name string) httprouter.Handle {
|
||||
}
|
||||
|
||||
// CachedHandler ...
|
||||
func (s *Server) CachedHandler(name string) httprouter.Handle {
|
||||
func (s *Server) CachedHandler() httprouter.Handle {
|
||||
return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||
ctx := NewContext(s.config, s.db, r)
|
||||
s.render("cached", w, ctx)
|
||||
@@ -108,7 +108,7 @@ func (s *Server) CachedHandler(name string) httprouter.Handle {
|
||||
}
|
||||
|
||||
// SearchHandler ...
|
||||
func (s *Server) SearchHandler(name string) httprouter.Handle {
|
||||
func (s *Server) SearchHandler() httprouter.Handle {
|
||||
return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||
ctx := NewContext(s.config, s.db, r)
|
||||
s.render("search", w, ctx)
|
||||
|
||||
Reference in New Issue
Block a user