Skip to content

Commit

Permalink
hotfix: add new payment statuses field to get single registration
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Nov 5, 2024
1 parent 880ed96 commit cfef71d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/registration_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ def get_single_registration(user_id, competition_id)
else
nil
end
payment_status = registration.payment_status
{
user_id: registration['user_id'],
guests: registration.guests,
Expand All @@ -346,7 +347,9 @@ def get_single_registration(user_id, competition_id)
waiting_list_position: waiting_list_position,
},
payment: {
payment_status: registration.payment_status,
payment_status: payment_status,
payment_statuses: [payment_status],
has_paid: payment_status == 'succeeded',
payment_amount_human_readable: registration.payment_amount_human_readable,
updated_at: registration.payment_date,
},
Expand Down

0 comments on commit cfef71d

Please sign in to comment.