refactor: change template generation from go-elem to templ and clean up the repository

This commit is contained in:
Patryk Hegenberg 2024-11-27 09:38:26 +01:00
parent f6b6f81826
commit a3dc4eddfa
19 changed files with 842 additions and 874 deletions

15
controllers/add.go Normal file
View file

@ -0,0 +1,15 @@
package controllers
import (
"net/http"
"github.com/labstack/echo/v4"
)
func (c *Controller) AddBewertungRoute(ctx echo.Context) error {
new := c.ParseBewertungen(ctx)
if new.Nachname != "" {
*c.Bewertungen = append(*c.Bewertungen, new)
}
return ctx.Redirect(http.StatusSeeOther, "/")
}