Skip to content

Commit

Permalink
Only require needed params
Browse files Browse the repository at this point in the history
  • Loading branch information
dangerousbeans committed Apr 8, 2024
1 parent e4b02bf commit 4ed2b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/discourse_api/api/categories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ def create_category(args = {})
args =
API
.params(args)
.required(:name, :color, :text_color)
.required(:name)
.optional(
:color,
:text_color,
:slug,
:permissions,
:auto_close_hours,
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require "discourse_api"
require "rspec"
require "webmock/rspec"
require "ostruct"

RSpec.configure do |config|
config.expect_with :rspec do |c|
Expand Down

0 comments on commit 4ed2b53

Please sign in to comment.