Skip to content

Commit

Permalink
[1217] Change course endpoint to use include param
Browse files Browse the repository at this point in the history
  • Loading branch information
Heidar Bernhardsson committed Apr 4, 2019
1 parent eb71778 commit c44454e
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/v2/courses_controller.rb
Expand Up @@ -12,7 +12,7 @@ def index
end

def show
render jsonapi: @course, include: [site_statuses: [:site]]
render jsonapi: @course, include: params[:include]
end

def sync_with_search_and_compare
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/api/v2/providers/courses_spec.rb
Expand Up @@ -73,7 +73,7 @@
before do
get "/api/v2/providers/#{provider.provider_code.downcase}/courses/#{findable_open_course.course_code.downcase}",
headers: { 'HTTP_AUTHORIZATION' => credentials },
params: { includes: "site_statuses" }
params: { include: 'site_statuses.site' }
end

it { should have_http_status(:success) }
Expand Down

0 comments on commit c44454e

Please sign in to comment.