mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
fix test Subscriptions::CreateAsAdminTest
user_id must be read from [:cart_items][:customer_id]
This commit is contained in:
parent
4c605a8324
commit
e75259734c
@ -84,7 +84,7 @@ class API::PaymentsController < API::ApiController
|
||||
def on_subscription_success(gateway_item_id, gateway_item_type, details)
|
||||
@subscription = Subscription.new(subscription_params)
|
||||
user_id = if current_user.admin? || current_user.manager?
|
||||
params[:cart_items][:subscription][:user_id]
|
||||
params[:cart_items][:customer_id]
|
||||
else
|
||||
current_user.id
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user