From 6cb901728a4a3c1ec9ff5d358f7240c65909c8c2 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 11 May 2023 22:57:52 +0200 Subject: [PATCH] Add new required field 'sub' --- sn.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sn.go b/sn.go index 0972bb9..7cc9b76 100644 --- a/sn.go +++ b/sn.go @@ -187,14 +187,15 @@ func PostStoryToStackerNews(story *Story, options PostStoryOptions) (int, error) body := GraphQLPayload{ Query: ` - mutation upsertLink($url: String!, $title: String!) { - upsertLink(url: $url, title: $title) { + mutation upsertLink($url: String!, $title: String!, $sub: String!) { + upsertLink(url: $url, title: $title, sub: $sub) { id } }`, Variables: map[string]interface{}{ "url": story.Url, "title": story.Title, + "sub": "bitcoin", }, } resp, err := MakeStackerNewsRequest(body)