Skip to content

Commit

Permalink
Access parsed json hash with string (#4349)
Browse files Browse the repository at this point in the history
* Access parsed json hash with string

* Use correct hash syntax in AggController spec
  • Loading branch information
zwolf authored Jun 15, 2024
1 parent df1f926 commit e2afd13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/aggregations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def create
create_params['links']['user']
)
super do |agg|
agg.update({ task_id: response[:task_id], status: 'pending' })
agg.update({ task_id: response['task_id'], status: 'pending' })
end
rescue AggregationClient::ConnectionError
json_api_render(:service_unavailable, 'The aggregation service is unavailable or not responding')
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/api/v1/aggregations_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
describe 'create' do
let(:test_attr) { :workflow_id }
let(:test_attr_value) { workflow.id }
let(:fake_response) { { 'task_id': 'asdf-1234-asdf' } }
let(:fake_response) { { 'task_id' => 'asdf-1234-asdf' } }
let(:mock_agg) { instance_double(AggregationClient) }

let(:create_params) do
Expand Down

0 comments on commit e2afd13

Please sign in to comment.