balanceHistory: sanitize the groupBy parameter in websocket API
This commit is contained in:
parent
918e032bfe
commit
6919055e30
@ -280,6 +280,9 @@ var requestHandlers = map[string]func(*WebsocketServer, *websocketChannel, *webs
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if r.GroupBy <= 0 {
|
||||||
|
r.GroupBy = 3600
|
||||||
|
}
|
||||||
rv, err = s.api.GetXpubBalanceHistory(r.Descriptor, fromTime, toTime, r.Fiat, r.Gap, r.GroupBy)
|
rv, err = s.api.GetXpubBalanceHistory(r.Descriptor, fromTime, toTime, r.Fiat, r.Gap, r.GroupBy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
rv, err = s.api.GetBalanceHistory(r.Descriptor, fromTime, toTime, r.Fiat, r.GroupBy)
|
rv, err = s.api.GetBalanceHistory(r.Descriptor, fromTime, toTime, r.Fiat, r.GroupBy)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user