2024-12-29-fixes #12
|
|
@ -29,11 +29,13 @@ func (res *Response) Write(w http.ResponseWriter, r *http.Request) error {
|
||||||
|
|
||||||
if res.SeeOther != "" {
|
if res.SeeOther != "" {
|
||||||
http.Redirect(w, r, res.SeeOther, http.StatusSeeOther)
|
http.Redirect(w, r, res.SeeOther, http.StatusSeeOther)
|
||||||
flash := res.Session.FlashPeek()
|
if res.Session != nil {
|
||||||
if flash != nil {
|
flash := res.Session.FlashPeek()
|
||||||
err := json.NewEncoder(w).Encode(flash)
|
if flash != nil {
|
||||||
if err != nil {
|
err := json.NewEncoder(w).Encode(flash)
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue