1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/views/api/payment_schedules/show_item.json.jbuilder
Sylvain effe5c7ba9 optimized the load time of the payment schedules list
From now, we no longer retrieve the client_secret directly from the API/list but from a specialized component which ask API/get_item.
This highly decrease the laod time needed to fetch API/list
2022-01-03 11:24:08 +01:00

7 lines
300 B
Ruby

# frozen_string_literal: true
json.partial! 'api/payment_schedules/payment_schedule_item', item: @payment_schedule_item
if @payment_schedule_item.payment_gateway_object && @payment_schedule_item.state == 'requires_action'
json.client_secret @payment_schedule_item.payment_intent.client_secret
end