mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
close #16
This commit is contained in:
parent
c65c995663
commit
79112ce342
@ -233,7 +233,11 @@ func (i *Info) serveListing(w http.ResponseWriter, r *http.Request, c *config.Co
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
return w.Write(marsh)
|
||||
if _, err := w.Write(marsh); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
return http.StatusOK, nil
|
||||
}
|
||||
|
||||
page := &p.Page{
|
||||
|
@ -134,5 +134,9 @@ func (p Page) PrintAsJSON(w http.ResponseWriter) (int, error) {
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
return w.Write(marsh)
|
||||
if _, err := w.Write(marsh); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
return http.StatusOK, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user