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{ body := GraphQLPayload{
Query: ` Query: `
mutation upsertLink($url: String!, $title: String!) { mutation upsertLink($url: String!, $title: String!, $sub: String!) {
upsertLink(url: $url, title: $title) { upsertLink(url: $url, title: $title, sub: $sub) {
id id
} }
}`, }`,
Variables: map[string]interface{}{ Variables: map[string]interface{}{
"url": story.Url, "url": story.Url,
"title": story.Title, "title": story.Title,
"sub": "bitcoin",
}, },
} }
resp, err := MakeStackerNewsRequest(body) resp, err := MakeStackerNewsRequest(body)