2024-12-29-fixes #12

Merged
Teajey merged 3 commits from 2024-12-29-fixes into main 2024-12-29 20:43:32 +13:00
1 changed files with 7 additions and 5 deletions
Showing only changes of commit ffd3890584 - Show all commits

View File

@ -29,6 +29,7 @@ func (res *Response) Write(w http.ResponseWriter, r *http.Request) error {
if res.SeeOther != "" {
http.Redirect(w, r, res.SeeOther, http.StatusSeeOther)
if res.Session != nil {
flash := res.Session.FlashPeek()
if flash != nil {
err := json.NewEncoder(w).Encode(flash)
@ -36,6 +37,7 @@ func (res *Response) Write(w http.ResponseWriter, r *http.Request) error {
return err
}
}
}
return nil
}