Add session infos (co2, price, solar %) (#7380)
This commit is contained in:
parent
6773536dcc
commit
9d14e3d446
25 changed files with 706 additions and 218 deletions
|
|
@ -69,7 +69,10 @@ func sessionHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// prepare data
|
||||
for i, s := range res {
|
||||
res[i].Odometer = math.Round(s.Odometer*10) / 10
|
||||
if s.Odometer != nil {
|
||||
odo := math.Round(*s.Odometer*10) / 10
|
||||
res[i].Odometer = &odo
|
||||
}
|
||||
}
|
||||
|
||||
if r.URL.Query().Get("format") == "csv" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue