summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 236bae4a299..940f8b64026 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -276,7 +276,7 @@ module API
email = user.emails.find_by(id: params[:email_id])
not_found!('Email') unless email
- Emails::DestroyService.new(current_user, self, email: email.email).execute
+ Emails::DestroyService.new(current_user, user, email: email.email).execute
::Users::UpdateService.new(current_user, user).execute do |user|
user.update_secondary_emails!
@@ -510,7 +510,7 @@ module API
email = current_user.emails.find_by(id: params[:email_id])
not_found!('Email') unless email
- Emails::DestroyService.new(current_user, self, email: email.email).execute
+ Emails::DestroyService.new(current_user, current_user, email: email.email).execute
::Users::UpdateService.new(current_user, current_user).execute do |user|
user.update_secondary_emails!