Add new required field 'sub'

This commit is contained in:
ekzyis 2023-05-11 22:57:52 +02:00
parent 2a9b7c6737
commit 6cb901728a
1 changed files with 3 additions and 2 deletions

5
sn.go
View File

@ -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)