diff options
author | James Lopez <james@jameslopez.es> | 2017-06-23 21:13:46 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 21:13:46 +0200 |
commit | 859858c7e69a2ac3536e4e417fa6fff81d4b84ea (patch) | |
tree | 38a875ffeaec56fd16aad1a053167a35e3f5df80 | |
parent | efb3d5e70f163bfd186fa3a02c967154103d27f4 (diff) | |
download | gitlab-ce-859858c7e69a2ac3536e4e417fa6fff81d4b84ea.tar.gz |
fix spec failures
-rw-r--r-- | lib/api/users.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 175db3a4a18..2eb776a539f 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -236,7 +236,7 @@ module API user = User.find_by(id: params.delete(:id)) not_found!('User') unless user - email = Emails::CreateService.new(current_user, user, declared_params(include_missing: false)).execute + email = Emails::CreateService.new(user,declared_params(include_missing: false)).execute if email.errors.blank? NotificationService.new.new_email(email) @@ -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, user, email: email.email).execute + Emails::DestroyService.new(user, email: email.email).execute end desc 'Delete a user. Available only for admins.' do @@ -488,7 +488,7 @@ module API requires :email, type: String, desc: 'The new email' end post "emails" do - email = Emails::CreateService.new(current_user, current_user, declared_params).execute + email = Emails::CreateService.new(current_user, declared_params).execute if email.errors.blank? NotificationService.new.new_email(email) @@ -506,7 +506,7 @@ module API email = current_user.emails.find_by(id: params[:email_id]) not_found!('Email') unless email - Emails::DestroyService.new(current_user, current_user, email: email.email).execute + Emails::DestroyService.new(current_user, email: email.email).execute end desc 'Get a list of user activities' |