refactor: rebuild application with stl only
This commit is contained in:
parent
0a4efb8630
commit
da24e3c258
10 changed files with 36 additions and 56 deletions
|
|
@ -2,14 +2,12 @@ package controllers
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func (c *Controller) AddBewertungRoute(ctx echo.Context) error {
|
||||
new := c.ParseBewertungen(ctx)
|
||||
func (c *Controller) AddBewertungRoute(w http.ResponseWriter, r *http.Request) {
|
||||
new := c.ParseBewertungen(w, r)
|
||||
if new.Nachname != "" {
|
||||
*c.Bewertungen = append(*c.Bewertungen, new)
|
||||
}
|
||||
return ctx.Redirect(http.StatusSeeOther, "/")
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue