Skip to content

Commit 07bf60c

Browse files
Remove redundant code
1 parent 024469d commit 07bf60c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

app/controllers/jobseekers/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def mark_notification_as_read_if_present
1111
return if params[:notification_id].blank?
1212

1313
notification = current_jobseeker.notifications.find_by(id: params[:notification_id])
14-
notification&.mark_as_read!
14+
notification&.mark_as_read
1515
end
1616
end
1717
end

app/controllers/publishers/base_controller.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ def check_ats_interstitial_acknowledged
2222

2323
def mark_notification_as_read_if_present
2424
return if params[:notification_id].blank?
25-
return if current_publisher.blank?
2625

2726
notification = current_publisher.notifications.find_by(id: params[:notification_id])
28-
notification&.mark_as_read!
29-
rescue StandardError => e
30-
Rails.logger.error("Failed to mark notification as read: #{e.message}")
27+
notification&.mark_as_read
3128
end
3229
end
3330
end

0 commit comments

Comments
 (0)