1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

fix SubscriptionsController - all tests passing

This commit is contained in:
Sylvain 2019-06-05 07:58:49 +02:00
parent 9fd6ea08b9
commit bd796bc588

View File

@ -16,7 +16,7 @@ class API::SubscriptionsController < API::ApiController
head 403
else
method = current_user.admin? ? :local : :stripe
user_id = current_user.admin? ? params[:user_id] : current_user.id
user_id = current_user.admin? ? params[:subscription][:user_id] : current_user.id
@subscription = Subscription.new(subscription_params)
is_subscribe = Subscriptions::Subscribe.new(current_user.id, user_id)