Saving success messages betteR

This commit is contained in:
Simon Martens
2026-01-23 20:00:55 +01:00
parent 7ef2611537
commit 0beb5a2c79
20 changed files with 1209 additions and 811 deletions

View File

@@ -3,7 +3,6 @@ package controllers
import (
"fmt"
"net/http"
"net/url"
"slices"
"strings"
@@ -143,7 +142,8 @@ func (p *OrtNewPage) POST(engine *templating.Engine, app core.App) HandleFunc {
}
}(app, createdPlace.Id)
redirect := fmt.Sprintf("/ort/%s/edit?saved_message=%s", createdPlace.Id, url.QueryEscape("Änderungen gespeichert."))
setFlashSuccess(e, "Änderungen gespeichert.")
redirect := fmt.Sprintf("/ort/%s/edit", createdPlace.Id)
return e.Redirect(http.StatusSeeOther, redirect)
}
}