File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
garden-app/pkg/weather/netatmo Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -197,15 +197,12 @@ func (c *Client) setDeviceIDs() error {
197197}
198198
199199func (c * Client ) refreshToken () error {
200- if c .Authentication == nil {
200+ if c .Config . Authentication == nil {
201201 return errors .New ("authentication is required but not configured" )
202202 }
203203
204- expiry := clock .Now ().AddDate (0 , 0 , - 1 )
205- if c .Config .Authentication != nil {
206- // It's safe to ignore the time.Parse error because knowing the expiration is an optional early exit
207- expiry , _ = time .Parse (time .RFC3339Nano , c .Config .Authentication .ExpirationDate )
208- }
204+ // It's safe to ignore the time.Parse error because knowing the expiration is an optional early exit
205+ expiry , _ := time .Parse (time .RFC3339Nano , c .Config .Authentication .ExpirationDate )
209206
210207 // Exit early if token is not expired
211208 if clock .Now ().Before (expiry ) {
You can’t perform that action at this time.
0 commit comments