Commit b2d53791 authored by Brett Walker's avatar Brett Walker

fix calls to Emails::DestroyService

parent 09726bdf
...@@ -155,7 +155,7 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -155,7 +155,7 @@ class Admin::UsersController < Admin::ApplicationController
def remove_email def remove_email
email = user.emails.find(params[:email_id]) email = user.emails.find(params[:email_id])
success = Emails::DestroyService.new(user, email: email.email).execute success = Emails::DestroyService.new(user).execute(email)
respond_to do |format| respond_to do |format|
if success if success
......
...@@ -366,7 +366,7 @@ module API ...@@ -366,7 +366,7 @@ module API
not_found!('Email') unless email not_found!('Email') unless email
destroy_conditionally!(email) do |email| destroy_conditionally!(email) do |email|
Emails::DestroyService.new(current_user, email: email.email).execute Emails::DestroyService.new(current_user).execute(email)
end end
user.update_secondary_emails! user.update_secondary_emails!
...@@ -689,7 +689,7 @@ module API ...@@ -689,7 +689,7 @@ module API
not_found!('Email') unless email not_found!('Email') unless email
destroy_conditionally!(email) do |email| destroy_conditionally!(email) do |email|
Emails::DestroyService.new(current_user, email: email.email).execute Emails::DestroyService.new(current_user).execute(email)
end end
current_user.update_secondary_emails! current_user.update_secondary_emails!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment