GrünStromIndex: return rates by copy
This commit is contained in:
parent
0aab56ac75
commit
f17f4f15ed
1 changed files with 1 additions and 1 deletions
|
|
@ -132,5 +132,5 @@ func (t *GrünStromIndex) Unit() string {
|
|||
func (t *GrünStromIndex) Rates() (api.Rates, error) {
|
||||
t.mux.Lock()
|
||||
defer t.mux.Unlock()
|
||||
return t.data, outdatedError(t.updated, time.Hour)
|
||||
return append(api.Rates{}, t.data...), outdatedError(t.updated, time.Hour)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue