Reformat stats display, protect against division by zero.
This commit is contained in:
1 parent
b1bb427f06
commit
86b6c71ca0
3 files changed
+29
-18
No files matched your search
@@ -370,7 +370,10 @@ func statsHandler(w http.ResponseWriter, r *http.Request, dataDir string) {
|
||||
|
||||
ss := stats.GetGroups()
|
||||
e := json.NewEncoder(w)
|
||||
e.Encode(ss)
|
||||
err = e.Encode(ss)
|
||||
if err != nil {
|
||||
log.Printf("stats.json: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user