Skip to content

Commit

Permalink
Fix examples that create topic using category name strings
Browse files Browse the repository at this point in the history
Only category id is supported as argument after this change:
discourse/discourse#7599
  • Loading branch information
nlalonde committed May 30, 2019
1 parent 64476cc commit 1ef0d9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/change_topic_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
client.api_username = "YOUR_USERNAME"

response = client.create_topic(
category: "Boing Boing",
category: 1,
skip_validations: true,
auto_track: false,
title: "Concert Master: A new way to choose",
Expand Down
4 changes: 2 additions & 2 deletions examples/create_topic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
client.api_username = "YOUR_USERNAME"

client.create_topic(
category: "Boing Boing",
category: 1,
skip_validations: true,
auto_track: false,
title: "Concert Master: A new way to choose",
Expand All @@ -16,7 +16,7 @@

# create Poll topic
client.create_topic(
category: "general",
category: 2,
skip_validations: false,
auto_track: false,
title: "Your Favorite Color?",
Expand Down

0 comments on commit 1ef0d9a

Please sign in to comment.