Skip to content

Commit

Permalink
Add render_json_response method from included class which does not ap…
Browse files Browse the repository at this point in the history
…pear to be available
  • Loading branch information
bbpennel committed Nov 13, 2023
1 parent e3fc80f commit 718882a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def render_riiif_404
render_json_response(response_type: :not_found)
end

def render_json_response(response_type: :success, message: nil, options: {})
json_body = Hyrax::API.generate_response_body(response_type: response_type, message: message, options: options)
render json: json_body, status: response_type
end

def render_404
render 'errors/not_found', status: 404
end
Expand Down

0 comments on commit 718882a

Please sign in to comment.