diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-18 11:28:43 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-18 11:28:43 +0300 |
| commit | 9525b8c9a3f714235c8e591f3eddd4c05ed791da (patch) | |
| tree | e0df3658d353649a7a23d0109b3f6924bba10af9 /internal/platforms/linkedin/linkedin.go | |
| parent | 56b272ca1b678023c51d730acda04e56867ad141 (diff) | |
use context in oauth2
Diffstat (limited to 'internal/platforms/linkedin/linkedin.go')
| -rw-r--r-- | internal/platforms/linkedin/linkedin.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go index 2e7e3ca..341834e 100644 --- a/internal/platforms/linkedin/linkedin.go +++ b/internal/platforms/linkedin/linkedin.go @@ -33,7 +33,7 @@ func post(ctx context.Context, args config.Args, sizeLimit int, ent entry.Entry) log.Println("Not posting", ent, "to LinkedIn as dry-run enabled") return nil } - personID, accessToken, err := oauth2.LinkedInCreds(args) + personID, accessToken, err := oauth2.LinkedInCreds(ctx, args) if err != err { return err } @@ -78,6 +78,7 @@ func callLinkedInAPI(personID, accessToken, message string) error { req.Header.Add("X-RestLi-Protocol-Version", "2.0.0") client := &http.Client{} + // TODO: Use ctx? resp, err := client.Do(req) if err != nil { return fmt.Errorf("Error sending request: %w", err) |
