db, handlers, and interfaces
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/dryrun Pipeline was successful
ci/woodpecker/push/publish-tag Pipeline was successful
ci/woodpecker/push/publish-latest Pipeline was successful

This commit is contained in:
2024-06-15 21:33:14 -04:00
parent 3d29dadaf3
commit 09a957ca4b
12 changed files with 160 additions and 95 deletions

View File

@@ -8,10 +8,10 @@ import (
)
type HomeHandler struct {
ts services.TodoService
ts *services.TodoService
}
func NewHomeHandler(ts services.TodoService) HomeHandler {
func NewHomeHandler(ts *services.TodoService) HomeHandler {
return HomeHandler{ts: ts}
}
@@ -32,7 +32,7 @@ func (h *HomeHandler) Home(w http.ResponseWriter, r *http.Request) {
}
}
func (h HomeHandler) Router() http.Handler {
func (h *HomeHandler) Router() http.Handler {
router := http.NewServeMux()
router.HandleFunc("/", h.Home)