Skip to content

Commit

Permalink
pass payload as param to log_params helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
danlim715 committed Mar 25, 2024
1 parent aa5956a commit 080d8fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/v1/pension_ipf_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def create
begin
PensionIpfNotification.create!(payload:)
rescue ActiveRecord::RecordInvalid => e
log_formatted(**log_params.merge(is_success: false), params: { exception_message: e.message })
log_formatted(**log_params(payload).merge(is_success: false), params: { exception_message: e.message })
return render json: { message: 'failed' }
end
end

log_formatted(**log_params.merge(is_success: true))
log_formatted(**log_params(payload).merge(is_success: true))
render json: { message: 'success' }
end

Expand Down Expand Up @@ -60,7 +60,7 @@ def bearer_token_secret
Settings.dig(:pension_ipf_vanotify_status_callback, :bearer_token)
end

def log_params
def log_params(payload)
{
key: :callbacks,
form_id: '21P-527EZ',
Expand Down

0 comments on commit 080d8fc

Please sign in to comment.