From a98fbd68214b9d99c425fb073051da790b0b15d0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 18 Oct 2024 21:20:46 +0300 Subject: initial edit --- internal/platforms/linkedin/linkedin.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'internal/platforms/linkedin') 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)) -- cgit v1.2.3