From cfef71d35ecd22694161703c763baf4fc85c8f50 Mon Sep 17 00:00:00 2001 From: FinnIckler Date: Tue, 5 Nov 2024 14:37:24 +0100 Subject: [PATCH] hotfix: add new payment statuses field to get single registration --- app/controllers/registration_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/registration_controller.rb b/app/controllers/registration_controller.rb index 59e79ab3..6368e9f7 100644 --- a/app/controllers/registration_controller.rb +++ b/app/controllers/registration_controller.rb @@ -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, @@ -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, },