Skip to content

Commit be4e532

Browse files
author
Brian Schroer
committed
1188 PR fixes.
1 parent 9dd7b41 commit be4e532

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

app/controllers/services_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def html_to_pdf
6969
render(status: 500)
7070
end
7171
rescue Pdfcrowd::Error => e
72-
render plain: e.getMessage, status: e.getCode
72+
puts "Failed to convert HTML to PDF: #{e}"
73+
render plain: "There was an error getting the PDF. Please try again", status: 500
7374
end
7475

7576
def featured

config/routes.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,15 @@
3636
resources :notes, only: :create
3737
resources :feedbacks, only: %i[create index]
3838
resources :addresses, only: %i[update destroy]
39-
collection do
40-
post :approve
41-
post :reject
42-
post :certify
43-
post :html_to_pdf
44-
end
39+
post :approve
40+
post :reject
41+
post :certify
4542
collection do
4643
get :featured
4744
get :pending
4845
get :count
4946
get :search
47+
post :html_to_pdf
5048
end
5149
end
5250
resources :notes do

0 commit comments

Comments
 (0)