Skip to content

Commit

Permalink
fix: board selection
Browse files Browse the repository at this point in the history
  • Loading branch information
keepcosmos committed May 14, 2017
1 parent efcb042 commit 966c927
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/terjira/client/board.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class << self
delegate :build, to: :resource

def all(options = {})
params = options.slice(:type)
resp = agile_api_get('board', params)
resp['values'].map { |value| build(value) }
boards_resp = agile_api_get('board')['values']
boards_resp = boards_resp.select { |board| board["type"] == options[:type] } if options[:type].present?
boards_resp.map { |board| build(board) }
end

def find(board_id)
Expand Down

0 comments on commit 966c927

Please sign in to comment.