go-cook-portal/handlers/home.go

27 lines
609 B
Go

package handlers
import (
"net/http"
"templ-test/views/home"
"github.com/labstack/echo/v4"
)
func (h *Handlers) HomeHandler(c echo.Context) error {
return Render(c, http.StatusOK, home.Home())
}
func (h *Handlers) Settings(c echo.Context) error {
return Render(c, http.StatusOK, home.UserSettings())
}
func (h *Handlers) SettingsPost(c echo.Context) error {
// take in the updated values from he user and write the cookies... tbd
return Render(c, http.StatusOK, home.UserSettings())
}
//func (h *Handlers) ListHandler(c echo.Context) error {
// return Render(c, http.StatusOK, views.List())
//}