Skip to content

Commit

Permalink
[2339] Fix up course v3 endpoint for subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmitchell committed Dec 27, 2019
1 parent fbe6934 commit f41afbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/api/v3/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def show
@course = @provider.courses.find_by!(course_code: params[:code].upcase)

if @course.is_published?
render jsonapi: @course, fields: fields_param, include: params[:include]
# https://github.com/jsonapi-rb/jsonapi-rails/issues/113
render jsonapi: @course, fields: fields_param, include: params[:include], class: CourseSerializersService.new.execute
else
raise ActiveRecord::RecordNotFound
end
Expand Down

0 comments on commit f41afbe

Please sign in to comment.