2024-12-29-fixes #12
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue