Skip to content

Commit

Permalink
Display on appeals show as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp-work committed May 29, 2024
1 parent 6a4f139 commit a852990
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/api/app/controllers/webui/appeals_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class Webui::AppealsController < Webui::WebuiController
after_action :verify_authorized
before_action :handle_notification, only: :show

def show
@appeal = Appeal.find(params[:id])
Expand Down Expand Up @@ -40,4 +41,11 @@ def decision_params
def appeal_params
params.require(:appeal).permit(:reason)
end

def handle_notification
return unless User.session && params[:notification_id]

Check warning on line 46 in src/api/app/controllers/webui/appeals_controller.rb

View check run for this annotation

Codecov / codecov/patch

src/api/app/controllers/webui/appeals_controller.rb#L46

Added line #L46 was not covered by tests

@current_notification = Notification.find(params[:notification_id])
authorize @current_notification, :update?, policy_class: NotificationPolicy

Check warning on line 49 in src/api/app/controllers/webui/appeals_controller.rb

View check run for this annotation

Codecov / codecov/patch

src/api/app/controllers/webui/appeals_controller.rb#L48-L49

Added lines #L48 - L49 were not covered by tests
end
end

0 comments on commit a852990

Please sign in to comment.