Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-19 15:51:46 +0300
committerJames Lopez <james@jameslopez.es>2017-06-23 12:41:42 +0300
commit87bf08c96cf9f3c451d0746d11ceac149adf22db (patch)
tree77c335814ece5510856135a5ba13dee39017f4a6 /lib/api/users.rb
parent3bab585bec5529c06ba4b0c4ae7e953b99edf6d3 (diff)
fix specs
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!