1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refactor: replace gorilla mux with chi

This commit is contained in:
Ferdinand Mütsch
2023-03-03 20:40:50 +01:00
parent e495468be2
commit a6ef735ba1
32 changed files with 1407 additions and 1582 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/emvi/logbuch"
"github.com/gorilla/mux"
"github.com/go-chi/chi/v5"
"github.com/gorilla/schema"
conf "github.com/muety/wakapi/config"
"github.com/muety/wakapi/models"
@@ -33,8 +33,8 @@ func NewHomeHandler(keyValueService services.IKeyValueService) *HomeHandler {
}
}
func (h *HomeHandler) RegisterRoutes(router *mux.Router) {
router.Path("/").Methods(http.MethodGet).HandlerFunc(h.GetIndex)
func (h *HomeHandler) RegisterRoutes(router chi.Router) {
router.Get("/", h.GetIndex)
}
func (h *HomeHandler) GetIndex(w http.ResponseWriter, r *http.Request) {