Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove JaResource from StripeConnectPlanController #1028

Conversation

landongrindheim
Copy link
Contributor

@landongrindheim landongrindheim commented Oct 8, 2017

Remove JaResource from StripeConnectPlanController

References

Closes #906

Progress on: #864

Copy link
Contributor

@begedin begedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going back on the params request. It's a matter of preference and this makes the controller code more standardized.

{:ok, :authorized} <- current_user |> Policy.authorize(:create, %StripeConnectPlan{}, params),
{:ok, %StripeConnectPlan{} = stripe_platform_plan} <- StripeConnectPlanService.create(params) |> handle_create_result(conn) do
conn |> put_status(:created) |> render("show.json-api", data: stripe_platform_plan)
end
end

defp handle_create_result({:error, :project_not_ready}, conn) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes you made look good.

However, you've managed to point out that the handle_create_result step, which I believe I wrote was and will continue causing problems here, for which I need to create an issue - #1031

@begedin begedin merged commit b1adc19 into code-corps:develop Oct 9, 2017
@landongrindheim landongrindheim deleted the 906-remove-ja-resource-from-stripe-connect-plan-controller branch October 10, 2017 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants