refactor: change template generation from go-elem to templ and clean up the repository
This commit is contained in:
parent
f6b6f81826
commit
a3dc4eddfa
19 changed files with 842 additions and 874 deletions
15
controllers/add.go
Normal file
15
controllers/add.go
Normal 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, "/")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue