Skip to content
Snippets Groups Projects
Commit b2d53791 authored by Brett Walker's avatar Brett Walker
Browse files

fix calls to Emails::DestroyService

parent 09726bdf
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -155,7 +155,7 @@ class Admin::UsersController < Admin::ApplicationController
 
def remove_email
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|
if success
Loading
Loading
Loading
Loading
@@ -366,7 +366,7 @@ module API
not_found!('Email') unless email
 
destroy_conditionally!(email) do |email|
Emails::DestroyService.new(current_user, email: email.email).execute
Emails::DestroyService.new(current_user).execute(email)
end
 
user.update_secondary_emails!
Loading
Loading
@@ -689,7 +689,7 @@ module API
not_found!('Email') unless email
 
destroy_conditionally!(email) do |email|
Emails::DestroyService.new(current_user, email: email.email).execute
Emails::DestroyService.new(current_user).execute(email)
end
 
current_user.update_secondary_emails!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment