worker: use custom requester also for oauth refresh

Just so we can share e.g. proxy server or other http transport settings.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2022-04-01 11:44:06 +02:00 committed by Tom Gundersen
parent 71a4ceecaa
commit 9ee3997428

View file

@ -149,7 +149,7 @@ func (c *Client) refreshAccessToken() error {
data.Set("client_secret", c.clientSecret)
}
resp, err := http.PostForm(c.oAuthURL, data)
resp, err := c.requester.PostForm(c.oAuthURL, data)
if err != nil {
return err
}