Fix Empty Librarys
This commit is contained in:
parent
4e0df234f1
commit
fa0f543feb
1 changed files with 1 additions and 3 deletions
|
@ -65,9 +65,7 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||||
var size int
|
var size int
|
||||||
err := db.QueryRow(r.Context(), "SELECT SUM(size) AS size FROM files WHERE missing = $1", false).Scan(&size)
|
err := db.QueryRow(r.Context(), "SELECT SUM(size) AS size FROM files WHERE missing = $1", false).Scan(&size)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.ErrorContext(r.Context(), "Query File Size Sum", "err", err)
|
size = 0
|
||||||
http.Error(w, "Error Query File Size Sum: "+err.Error(), http.StatusInternalServerError)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
data.Counter = splitInt(size)
|
data.Counter = splitInt(size)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue