diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-18 21:20:46 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-18 21:20:46 +0300 |
| commit | a98fbd68214b9d99c425fb073051da790b0b15d0 (patch) | |
| tree | 9a312a15e4ec73a31d7e6ea9dc704b2df6a9011b /internal/platforms/linkedin | |
| parent | 84b404e392c94174d1c5ae4feb8afc4f5d334346 (diff) | |
initial edit
Diffstat (limited to 'internal/platforms/linkedin')
| -rw-r--r-- | internal/platforms/linkedin/linkedin.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go index 4be231c..4503c53 100644 --- a/internal/platforms/linkedin/linkedin.go +++ b/internal/platforms/linkedin/linkedin.go @@ -64,8 +64,15 @@ func callLinkedInAPI(ctx context.Context, personID, accessToken, message string) if err != nil { return fmt.Errorf("Error encoding JSON:%w", err) } - if !prompt.YesWithContent("Do you want to post this message to LinkedIn?", message) { + + switch prompt.DoYouWantThis("Do you want to post this message to Linkedin?", message) { + case prompt.No: return prompt.ErrAborted + case prompt.Yes: + case prompt.Edit: + panic("edit not yet implemented") // TODO + default: + panic("should never happen") } req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewBuffer(payload)) |
