Add Pi-hole blocked percentage and date widgets
This commit is contained in:
@@ -2,7 +2,6 @@ package pihole
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
)
|
||||
|
||||
type Summary struct {
|
||||
@@ -35,7 +34,7 @@ func (ph *PiHConnector) Summary() Summary {
|
||||
|
||||
err := json.Unmarshal(ph.get("stats/summary"), summary)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
summary = &Summary{}
|
||||
}
|
||||
return *summary
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user