chore: fix panic

This commit is contained in:
andig 2023-11-30 11:26:05 +05:00
parent c360cabdce
commit f5347c6b2d
2 changed files with 2 additions and 0 deletions

View file

@ -43,6 +43,7 @@ func NewAwattarFromConfig(other map[string]interface{}) (api.Tariff, error) {
embed: &cc.embed,
log: util.NewLogger("awattar"),
uri: fmt.Sprintf(awattar.RegionURI, strings.ToLower(cc.Region)),
data: util.NewMonitor[api.Rates](2 * time.Hour),
}
done := make(chan error)

View file

@ -65,6 +65,7 @@ func NewEntsoeFromConfig(other map[string]interface{}) (api.Tariff, error) {
embed: &cc.embed,
token: cc.Securitytoken,
domain: domain,
data: util.NewMonitor[api.Rates](2 * time.Hour),
}
// Wrap the client with a decorator that adds the security token to each request.