Skip to content

Commit

Permalink
fix bug with api
Browse files Browse the repository at this point in the history
  • Loading branch information
briri committed Jul 30, 2020
1 parent 98c4871 commit 5c96690
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/controllers/api/v1/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ def create
# rubocop:enable Metrics/BlockNesting
assign_roles(plan: plan)

# TODO: Remove this customization after the Hackathon
UserMailer.api_plan_creation(plan, plan.owner).deliver_now

# Kaminari Pagination requires an ActiveRecord result set :/
@items = paginate_response(results: Plan.where(id: plan.id))
render "/api/v1/plans/index", status: :created
Expand Down Expand Up @@ -144,7 +141,7 @@ def contributor_to_user(contributor:)
return user if user.present?

# If the user was not found, invite them and attach any know identifiers
names = contributor.name.split
names = contributor.name&.split || [""]
firstname = names.length > 1 ? names.first : nil
surname = names.length > 1 ? names.last : names.first
# user = User.invite!({ email: contributor.email,
Expand Down

0 comments on commit 5c96690

Please sign in to comment.